JavaFX 13 HelloFX sample to run with different options and build tools.
Download JDK 11 or later for your operating system.
Make sure JAVA_HOME
is properly set to the JDK installation directory.
Download JavaFX SDK for your operating system and unzip to a desired location.
If you run on Linux or Mac, follow these steps:
cd HelloFX/CLI/hellofx
export PATH_TO_FX=path/to/javafx-sdk-13/lib
Compile:
javac --module-path $PATH_TO_FX --add-modules javafx.controls HelloFX.java
Run:
java --module-path $PATH_TO_FX --add-modules javafx.controls HelloFX
If you run on Windows, follow these steps:
cd HelloFX\CLI\hellofx
set PATH_TO_FX="path\to\javafx-sdk-13\lib"
Compile:
javac --module-path %PATH_TO_FX% --add-modules javafx.controls HelloFX.java
Run:
java --module-path %PATH_TO_FX% --add-modules javafx.controls HelloFX