<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
I'm not sure what the exception is, but I see two things you might
want to try:<br>
<br>
1. It seems like a bad idea to set the destination dir for jlink to
be within the JDK you are running jlink from. This is the most
likely source of the error.<br>
<br>
2. I don't see where you are pointing to the JavaFX modules.<br>
<br>
I would recommend running something like the following, from some
directory that not inside .../images/jdk<br>
<br>
.../images/jdk/bin/jlink --output myjdk --module-path
.../images/jmods:.../javafx-jmods-17.0.7 --add-modules
ALL-MODULE-PATH<br>
<br>
-- Kevin<br>
<br>
<br>
<div class="moz-cite-prefix">On 3/16/2023 7:23 AM, Doug Whitfield
wrote:<br>
</div>
<blockquote type="cite" cite="mid:DM6PR20MB3004BCD6457838622B0EE39FABBC9@DM6PR20MB3004.namprd20.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}span.test-idfield-value
{mso-style-name:test-id__field-value;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span class="test-idfield-value">I tried
sending this to the dev mailing list yesterday but it looks
like it never went through. I’m not sure if the dev list is
just for committers or what. Maybe it will come through
eventually.<br>
<br>
I would like to use the java tool jlink to create a
customized JRE within our own compiled OpenJDK version.</span><br>
<br>
<span class="test-idfield-value">I use this guide to compile
my OpenJDK version 17:</span><br>
<span class="test-idfield-value"><a href="https://wiki.openjdk.org/display/OpenJFX/Building+OpenJFX" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://wiki.openjdk.org/display/OpenJFX/Building+OpenJFX</a></span><br>
<br>
<span class="test-idfield-value">The used version is: git
clone <a href="https://github.com/openjdk/jfx17u" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">
https://github.com/openjdk/jfx17u</a></span><br>
<br>
<span class="test-idfield-value">Basically the compilation
(bash configure, and make images) is successful and I am
able to run java.</span><br>
<br>
<span class="test-idfield-value">bash configure
–with-boot-jdk=/cygdrive/c/jdk1602</span><br>
<span class="test-idfield-value">make images</span><br>
<br>
<span class="test-idfield-value">openjdk@debian10-uni:~/Java17/jdk17u/build/linux-x86_64-server-release/jdk/bin$
./java -version</span><br>
<span class="test-idfield-value">openjdk version
"17.0.7-internal" 2023-04-18</span><br>
<span class="test-idfield-value">OpenJDK Runtime Environment
(build 17.0.7-internal+0-adhoc.openjdk.jdk17u)</span><br>
<span class="test-idfield-value">OpenJDK 64-Bit Server VM
(build 17.0.7-internal+0-adhoc.openjdk.jdk17u, mixed mode)</span><br>
<br>
<span class="test-idfield-value">Now I use jlink to customize
the JRE. The command is this one:</span><br>
<br>
<span class="test-idfield-value">openjdk@debian10-uni:~/Java17/jdk17u/build/linux-x86_64-server-release/jdk/bin$
./jlink —add-modules java.base —module-path
../../images/jmods —output my-jre</span><br>
<span class="test-idfield-value">The result is this:</span><br>
<span class="test-idfield-value">Error:
java.io.UncheckedIOException:
java.nio.channels.ClosedChannelException</span><br>
<br>
<span class="test-idfield-value">If I replace the module
java.bases with "—add-modules ALL-MODULE-PATH" then the
result is this:</span><br>
<span class="test-idfield-value">WARNING: Using incubator
modules: jdk.incubator.foreign, jdk.incubator.vector</span><br>
<span class="test-idfield-value">Error:
java.io.UncheckedIOException:
java.nio.channels.ClosedChannelException</span><br>
<br>
<br>
<span class="test-idfield-value">Doing the same with a
pre-compiled version <a href="https://jdk.java.net/archive" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">
https://jdk.java.net/archive</a> ((build 17.0.2+8) then
jlink is working fine and it creates my-jre and the command
"java -version" runs successfully.</span><br>
<span class="test-idfield-value">I tried already to use jlink
from the downloaded JDK and the jmods from my compiled
version. This is working as well. But using jlink from my
own compiled version with jmods from the download JDK does
not work.</span><br>
<br>
<span class="test-idfield-value">Do you have an idea, what’s
wrong there? Does jlink have a bug in 17.0.7? How can I
overcome this problem? Is there a better place to ask this
question? Would any additional information be useful?</span><o:p></o:p></p>
</div>
<br>
<p><span style="font-size:8.0pt;color:#A6A6A6;font-style:italic">This
e-mail may contain information that is privileged or
confidential. If you are not the intended recipient, please
delete the e-mail and any attachments and notify us
immediately.</span></p>
<br>
</blockquote>
<br>
</body>
</html>