Search code examples
javajavafxlaunch4j

How do you package JavaFX within a .exe file created by Launch4j?


I am trying to create a JavaFX application, but I cannot find a way to bundle the JavaFX jar files within the EXE file created by Launch4j. Is there a way to do this?

What I have so far is an EXE and a distribution of OpenJFX 14 and OpenJDK 14 in the same folder with JRE path and VM options as dictated by the OpenJFX documentation.

I am using OpenJDK 14.0.1 with Open JavaFX 14.0.2.


Solution

  • You can try by extracting required library in generated jar while creating runnable

    Select option like this:

    Library handling

    After it, perform simple launch4j steps to create .exe