Distributing JavaFX 11 Application

Nicolas Therrien nicolas.therrien at motorolasolutions.com
Wed Feb 20 18:55:49 UTC 2019


What is the proper way to create distributable packages of a JavaFx

I have a Java 11 application which I build as a module. The distribution
includes a "modules" folder with all dependencies in it, and a script to
launch the module.

This assembly works if I build it on the same machine as I am going to be
running it on. However, I realized that depending on which build agent the
assembly is going to be created, the platform specific javafx dependencies
may not match the target assembly. For example, if the build agent is a
linux build agent, the windows and mac assembly contains linux javafx

Maven will always pull the platform-specific libraries of the system it is
running on.

This was not a problem when JavaFx was part of the JDK since the correct
runtime libraries were installed on the system already.

What is the correct way to create a windows or linux package in a build
platform independent way?

I found an article which showed how to force maven to include all platforms
as dependencies, but then I have to add dependency on each transitive
library. Sounds like a lot of trouble for a simple task.

How do you guys package your apps for various platforms?

*Nicolas Therrien*

Senior Software Developer


*o*: +1.819.931.2053

More information about the openjfx-dev mailing list