Native macOS and Windows Application
Andrea Liana
andrea.liana at ingliana.com
Thu Oct 11 07:42:43 UTC 2018
Hello,
I am asking directions about the best way to do obtain a proper macOS
native application from a Java 11 project. And also for Windows platform.
My current project is made of a number of modules plus some
not-modularized jars for JDBC access and I need also to include the
JavaFX 11 modules.
My problem is that the current macOS support for Java inside a ".app"
still works with classpaths, not modules.
So i tried a different approach:
- I created a template with Platypus (http://sveinbjorn.org/platypus/)
- I made a little program for research purpose that creates all modules
jars using the compiler API
- with jlink I created a working command line application with all jars,
modularized and not
- I modified the Platypus template and inserted the jlink application
inside the .app; the Platypus script calls the jlink generated start.sh.
The final result is decent but poses some problems for later updates.
When I was using the classpath approach I was able to update the jars
included under .app/Contents/Resources folder when needed; now with
jlink I can no longer apply this strategy.
I am looking for some advice if there is a better approach to obtain a
native macOS .app / Windows .exe which let me still replace jars with
later upgrades without distributing the entire application again.
Thanking in advance,
Andrea Liana
More information about the openjfx-discuss
mailing list