We are migrating a Java 1.8 JavaFX/Webstart application to Java 11 using Openjfx (https://openjfx.io) and OpenWebStart (https://openwebstart.com).
We successfully migrate and run the app to JavaFx-14 (OpenJfx). To run it at the IDE now it is necessary to include the following jvm args:
--module-path 'path/javafx-sdk-11.0.2/lib' --add-modules javafx.controls,javafx.fxml
We build the App using Maven. It beautifully works on Java 1.8. It signs all jars, create the package and the jnlp file. Maven also creates an "uber jar" with all dependencies included. We migrated the POM including the new deps. We tested it by manually running the App using the uber jar file via command line (using the --module-path parameters).
We included the --module-path argument in .jnlp file:
<?xml version="1.0" encoding="utf-8"?>
<jnlp
spec="1.0+"
codebase="http://localhost:8080/download/"
href="myapp.jnlp">
<information>
<title>MyApp</title>
<vendor>Myself</vendor>
<homepage href="http://localhost:8080"/>
<description>My App</description>
<description>Migration test</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="11"
initial-heap-size="256m"
max-heap-size="2048m"
java-vm-args="-Xms256m -Xmx4096m -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 --module-path '/Users/chocksmith/Desktop/javafx-sdk-11.0.2/lib' --add-modules javafx.controls,javafx.fxml"/>
<jar href="myapp-5.0.0.jar"/>
</resources>
<application-desc main-class="com.mycompany.myproduct.application.App"/>
</jnlp>
Unfortunately it fails:
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:670)
We run out of ideas here. Please advise!