Can we use JavaPackager and a get full JRE?
swpalmer at gmail.com
Sat Aug 8 23:16:42 UTC 2015
I’m using the JavaFX gradle plugin to build a very simple application with the new java packager and I’ve noticed a problem with the embedded JRE, at least on OS X.
Specifically, the ‘bin’ folder is missing from the embedded JRE, presumably because the embedded launcher replaces it.
However my application (and many others) needs to launch a new java process. Part of the reason for doing so is so it can be launched with new JVM options that are determined at runtime. For example modifying the java.library.dir after finding “plugins” that have native code.
Now it fails when running from the app bundle (works fine from a command line). The problems is that it fails to launch a new ‘java’ process because it expects to find 'bin/java' in the JRE folder.
What is the solution?
Since I’m using Gradle, I’m thinking I could tweak things to copy the JRE bin folder into the xxxx.app/Contents/PlugIns/Java.runtime/Contents/Home/jre/ folder, but really the javapackager should have an option to include the “full” JRE.
Or perhaps we need a new API in Java 9 to support launching a new Java process?
More information about the openjfx-dev