问题
I am trying to create cross platform / platform independent executables for my JAVA-9 application / project jigsaw.
I think jlink command will create only platform specific executable/runtime.
回答1:
JLink (covered by JEP 282) creates modular runtime images (covered by JEP 220, particularly the section New run-time image structure). These images are a generalization of JRE, JDK, and compact profiles and are OS specific like they are. JLink can hence not be used to create cross-platform executables.
That said, it is possible to run JLink on one operating system and create a runtime image for a different OS. All you have to do for that is to download and unpack a JDK 9 (same version as the one JLink comes from) for that and put its jmods
folder on the module path for the JLink call.
来源:https://stackoverflow.com/questions/37210288/how-to-create-cross-platform-executables-for-jdk9-application-using-jlink-comman