Compiling and Running a JavaFX Application on Command Line Using JDK
by xanthium-enterprises in Circuits > Software
8881 Views, 0 Favorites, 0 Comments
Compiling and Running a JavaFX Application on Command Line Using JDK
![javafx-cmd-tools-banner.png](/proxy/?url=https://content.instructables.com/FFL/D0ZG/KZZKLKLH/FFLD0ZGKZZKLKLH.png&filename=javafx-cmd-tools-banner.png)
JavaFX is a software platform from Oracle for creating and delivering desktop GUI applications that can run across a wide variety of devices and operating systems.
Here we will be building javaFX application using JDK on command line without using any IDE like intellij ,Netbeans or Eclipse.
Online Video Tutorial
![Compiling JavaFX application on Command line using JDK](/proxy/?url=https://content.instructables.com/FL4/OHR7/KZZKLKNI/FL4OHR7KZZKLKNI.jpg&filename=Compiling JavaFX application on Command line using JDK)
The tutorial for compiling java fx applications using command line tools is available in Video Format too.
Compiling the Java Fx Libraries Using Command Line
![compile-javafx-command-line.png](/proxy/?url=https://content.instructables.com/FYS/YR4B/KZZKLKLI/FYSYR4BKZZKLKLI.png&filename=compile-javafx-command-line.png)
To Compile a simple javafx application you have to use the following command
javac --module-path "Path to your javafx lib folder" --add-modules javafx.controls,javafx.fxml YourFile.java
Running JavaFX App Using Command Line Tools
![javafx-gui-hello-world.png](/proxy/?url=https://content.instructables.com/FQF/ZAJW/KZZKLKLJ/FQFZAJWKZZKLKLJ.png&filename=javafx-gui-hello-world.png)
To Run the compiled javafx application class you have to use the following command.
java --module-path "Path to your javafx lib folder" --add-modules javafx.controls,javafx.fxml YourFile