On 3/15/20 6:42 AM, Patrik Karlström wrote:
Given my problems the last couple of months and seeing people here in
the same situation, I thought that I should write about what I ended
up doing.
It was really easy in the past when one could just distribute the
application and then relying on the “world wide” JRE to take care of
the rest.
That is not the case after Java 8.
Oracle JDK 9 and 10 did too. It's just that OpenJDK doesn't.
For the last 7 months or so I have been working on moving Mapton, a
NetBeans Platform application, from Java 8 to Java 11 and beyond.
I’ve tried many setups back and forth:
* using the Platform JavaFX modules,
* using jars,
* using the AzulFX and LibericaFX JRE’s,
* among other things.
I ended up with the following workflow:
1. Run NetBeans on a JDK with bundled JavaFX modules
2. Use JavaFX classes, without using any fx dependencies, exclude if
necessary
3. Use jlink to create a custom, one for each OS, JRE based off
AdoptOpenJDK and the latest JavaFX jmods from Gluon.
...and the thing is, creating a custom JRE was the general advice all
along.
I guess it’s just to roll with the changes. :)
I had created an AppLauncher for JavaFX applications you may be
interested in:
https://github.com/BlueGoliath/AppLauncher
All it does is use the Java 11 single source run feature and some basic
Java in order to create a basic app launcher / packager.
Custom JDK builds will only work for you unless you somehow package the
custom JDK and force the application to use it.
/Patrik