Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Learn JavaFX without IDE

i want to learn javaFX but online sources only show installation and setup in an IDE like: Netbeans , Eclipse , IntelliJ etc.

but i want to do it without IDE
ie : using only Terminal and a text editor(vim).

what is the steps to set up JavaFX for a projects and run it without any IDE.

JDK version:- 11.0.4
Os :- Parrot OS

like image 337
Saneen K P Avatar asked Oct 15 '25 03:10

Saneen K P


1 Answers

  1. first download your desired version of java i would recommend openjdk-11
    sudo apt install openjdk-11-jdk
  2. download the javaFx from here
  3. set the JAVA_HOME environment variable to the JDK installation directory (this answer would help)
  4. set the PATH_TO_FX environment variable by the same way as above but the path should point to /lib eg: export PATH_TO_FX=path/to/javafx-sdk-11/lib
  5. compile and run your javafx code like this :

javac --module-path $PATH_TO_FX --add-modules javafx.controls [filename].java

java --module-path $PATH_TO_FX --add-modules javafx.controls [filename]

like image 172
med benzekri Avatar answered Oct 17 '25 18:10

med benzekri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!