<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
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;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<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">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">
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">
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>
</body>
</html>