Create a personalised JRE with Java 15 on Windows for Linux and Mac

823 views Asked by At

I have found a way to create a personalised JRE on Windows that I can use on Windows.

I found a similar question on this web site where the answer was "you just have to use the Linux jmods directory to make a Linux personalised JRE."

So, using AdoptOpenJDK (build 15+36), I tried to do that with the following commands:

jlink --module-path \jmodsWindows\ --add-modules java.desktop --output OUTWindows\java
jlink --module-path \jmodsLinux\ --add-modules java.desktop --output OUTLinux\java
jlink --module-path \jmodsMac\ --add-modules java.desktop --output OUTMac\java

But the personalised JREs that all three above commands created are the Windows one.

Is there something wrong with my commands? Is there a change in JDK 15 that affects how the jlink tool creates custom runtime images?

1

There are 1 answers

2
Hydrolien On BEST ANSWER

@deduper I tried with :

jlink --module-path C:\Users\hydrolien\Formiko\jmodsLinux --add-modules java.desktop --output OUTLinux\java

And that's working !

That was just a problem of absolute or relative path.

thanks a lot for your help !