Install4J VM parameters for JAVAFX seem to not pass to the JVM
With a non-modularized application which depends on JAVAFX the suggested approach is adding
"--module-path ${PATH_TO_FX} --add-modules ALL-MODULE-PATH"
or specific modules to the java command line. This works fine. However, when creating an installer with install4j and including these in the Java Invocation VM parameters field for the installer, the application does not start and reports error:java.lang.RuntimeException: No toolkit found
This is a new behavior since updating to Java 11+ (given modularization and JavaFX separation). For other reasons we have no desire to modularize our whole application yet. The code works fine in Eclipse and with by hand command line or bat start up. We have also tried to include a VMoptions file with these arguments to no avail.
Currently running AdoptOpenJDK-13, JAVAFX-13, and Install4J 7.0.12
--module-path ${PATH_TO_FX} --add-modules ALL-MODULE-PATH
How can we create the install4j installer that has the same start up behavior as our command line -- recognizing javafx -- while still not modularizing the full application?
The command line arguments are:
"--module-path ${PATH_TO_FX} --add-modules ALL-MODULE-PATH"
The extended error when running the install4j launcher is:
java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:830)