简体   繁体   English

在适用于 Linux 和 Mac 的 Windows 上使用 Java 15 创建个性化 JRE

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

I have found a way to create a personalised JRE on Windows that I can use on Windows.我找到了一种在 Windows 上创建可以在 Windows 上使用的个性化 JRE 的方法。

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."我在这个网站上发现了一个类似的问题,答案是“你只需要使用 Linux jmods 目录来制作 Linux 个性化 JRE。”

So, using AdoptOpenJDK (build 15+36) , I tried to do that with the following commands:因此,使用AdoptOpenJDK (build 15+36) ,我尝试使用以下命令来做到这一点:

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.但是以上三个命令创建的个性化 JRE 是 Windows 的。

Is there something wrong with my commands?我的命令有问题吗? Is there a change in JDK 15 that affects how the jlink tool creates custom runtime images? JDK 15 中是否有影响jlink工具创建自定义运行时映像的更改?

@deduper I tried with : @deduper 我试过:

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 !非常感谢你的帮助 !

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM