Skip to content

Instantly share code, notes, and snippets.

@YashKumarVerma
Created October 13, 2020 17:24
Show Gist options
  • Save YashKumarVerma/71365094846310c8a786b32b4de0e506 to your computer and use it in GitHub Desktop.
Save YashKumarVerma/71365094846310c8a786b32b4de0e506 to your computer and use it in GitHub Desktop.
Running OpenJFX Applications from CLI

Use the following commands in a bash script to quickly compile and run openjfx (javafx) applications. Just make sure to set your jdk path instead of mine.

echo "Compiling :"
javac --module-path /home/yash/scripts/packages/javafx-sdk-11.0.2/lib --add-modules javafx.controls,javafx.fxml $1.java

echo "Running..."
java --module-path /home/yash/scripts/packages/javafx-sdk-11.0.2/lib --add-modules=javafx.controls -cp . $1   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment