2

When using the Java Packager in Java 8, one had the choice to not include a runtime in the resulting image (see for example this question).

I'm trying to achieve the same (using the ant tasks described over here). However I don't know how to not include the JVM in the resulting .app or .exe file.

<fx:deploy nativeBundles="image" ...>
    <fx:runtime anythingICanDoHere?>
    ...
</fx:deploy>

The reason why I am asking: I am creating my own runtime using the jlink utility and want to replace the default runtime bundled with the application. This works just fine, but as replace the default runtime anyway, it is an unnecessary step to include it in the first place.

Side note: The application is not yet JPMS compliant, so the entire JVM is included.

Sebastian S
  • 4,420
  • 4
  • 34
  • 63

1 Answers1

0

The javapackager provided with JDK 9 and up uses jlink to generate the jre image:

For self-contained applications, the Java Packager for JDK 9 packages applications with a JDK 9 runtime image generated by the jlink tool. To package a JDK 8 or JDK 7 JRE with your application, use the JDK 8 Java Packager.

https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719

You can even pass arguments to jlink using -BjlinkOptions=<options>

robot_rover
  • 130
  • 8