Bundling JRE 8 and JavaFX application

tmanolatos :

We wrote a JavaFX application using JDK8 and we would like now to deploy our app not only using the jar file but also alternatively providing a zip file that bundles:

  1. the jar file my.jar
  2. a .bat (or .sh) file that simple does .\jre\bin\java.exe -jar my.jar
  3. the jre itself in a jre folder

Ideally we would like to create three such bundles (zip files): for Windows, Linux, MacOS. This can be easier for the end user and saves the trouble of the user downloading a proper JRE, installing it etc.

So, we now have to decide on the legally proper JRE to include to our zip file (technically we could simply bundle the Oracle JRE - but Oracle TOS clearly prohibit the distribution from ISVs).

Due to the recent Oracle licensing developments not only for Java but also for JavaFX, the separate licensing of JavaFX etc, I am really straggling to find the proper use of the license-friendlier AdoptJDK, OpenJFX, OpenJDK etc to create the bundle above.

What might be the most sensible approach to allow us form this JRE/JavaFX bundle?

Which jre should we include that also contains a properly licensed JavaFX runtime?

Should we bundle the jre separate from JavaFX implementation?

Sal :

What might be the most sensible approach to allow us form this JRE/JavaFX bundle? Which jre should we include that also contains a properly licensed JavaFX runtime? Should we bundle the jre separate from JavaFX implementation?

Oracle builds have both, but you can't distribute it as a commercial product (technically you can for older versions).

For JRE 8/Java 8 apps-use amazon coretto distro, it comes bundled with both. There are other distros as well, but I would trust Amazon more to keep more current since they are incentivized to keep their cloud customers happy and secure. https://aws.amazon.com/corretto/

In the longer term, you probably will be forced to upgrade to JRE 11, in which all JREs work the same and JFX is bundled separately for all builds. Either way you can no longer distribute any Oracle builds without paying Oracle.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=307009&siteId=1