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

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.

Original Tutorial Compiling and Running a JavaFX Application on Command Line Using JDK can be found here

Online Video Tutorial

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

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

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