Starting with badass-runtime-example-javafx which works for me, I copied this project and extended it with my own code. I created an image with gradlew runtime
. When executing the generated .bat file on Windows, I get "Error: JavaFX runtime components are missing, and are required to run this application".
In build.gradle, I added an additional module javafx.fxml
:
javafx {
modules = ['javafx.controls', 'javafx.fxml' ]
}
I also ran the suggestModules
task and added the suggested modules to
runtime {
modules = ['java.naming', 'java.xml ...']
}
My question is how I can analyze which modules are missing from the Java runtime. I see that java.exe
is executed only with -classpath
(which includes the application jar) and the main class parameter.
Is java --list-modules
the answer? I see there is a large file "modules" in build\image\lib which looks important to me.
I am looking for an analytical method of discovery to solve the problem.