I'm following this guide on openjfx.io to compile and run HelloFX.java.
- Ubuntu 18.04.2 LTS, via Windows Sybsystem For Linux
- Installed openjdk via
apt install openjdk-11-jre
- Downloaded JavaFX from here, linked from the guide.
$ java -version
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04)
OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04, mixed mode, sharing)
Here's what I get:
$ export PATH_TO_FX=/home/connor/javafx-sdk-11.0.2/lib
$ javac --module-path $PATH_TO_FX --add-modules javafx.controls HelloFX.java
$ java HelloFX
Error: Could not find or load main class HelloFX
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
I think it's an error in my JFX setup; an error in the XMing setup would cause a different error.