Despite reviewing How to run ControlsFX sample application using Java 11 and JavaFX 11 and How to run ControlsFX Java 11 and JavaFX 11 as well as other suggestions on the web, I still can't get the ControlsFX samples app to run in Java 11 (OpenJDK 11.0.1). Here's my command line:
java --module-path ~/Downloads/javafx-sdk-11.0.1/lib --add-modules=javafx.controls,javafx.fxml,javafx.web --add-exports javafx.base/com.sun.javafx.event=ALL-UNNAMED -jar controlsfx-samples-9.0.1-SNAPSHOT.jar
and output:
Error: Could not find or load main class org.controlsfx.fxsampler.fxsampler.FXSampler
Caused by: java.lang.ClassNotFoundException: org.controlsfx.fxsampler.fxsampler.FXSampler
Any help would be appreciated thanks.
I did not have access to the controlsfx-samples-9.0.1-Snapshot. I got version 9.0.0 and I tried this out and it somewhat worked. Do not use ALL-UNNAMED. For me, using ALL-UNNAMED cause the program to not work. The class you want to export to should be controlsfx. Sorry, the command line code is long because you need to add exports for almost everything.
You can download the 9.0.0 of the sampler from http://fxexperience.com/controlsfx/.
java --module-path ".:/home/frostilia/JavaLib/javafx-sdk-11.0.1/lib/" --add-modules ALL-MODULE-PATH --add-exports javafx.base/com.sun.javafx.runtime=controlsfx --add-exports=javafx.base/com.sun.javafx.event=controlsfx --add-exports=javafx.controls/com.sun.javafx.scene.control=controlsfx --add-exports=javafx.base/com.sun.javafx.collections=controlsfx --add-exports=javafx.graphics/com.sun.javafx.css=controlsfx --add-exports=javafx.graphics/com.sun.javafx.scene.traversal=controlsfx --add-exports=javafx.graphics/com.sun.javafx.scene=controlsfx --add-exports=javafx.controls/com.sun.javafx.scene.control.behavior=controlsfx --add-exports=javafx.controls/com.sun.javafx.scene.control.inputmap=controlsfx --add-opens=javafx.base/com.sun.javafx.event=controlsfx --add-opens=javafx.controls/javafx.scene.control.skin=controlsfx --add-opens=javafx.graphics/javafx.scene=controlsfx -jar controlsfx-samples-9.0.0.jar