How to Run Java files Using JavaFX
How to Run Java files Using JavaFX
- Download a JavaFX runtime for your operating system and unzip it to a desired location:

- Add an environment variable pointing to the lib directory of the runtime. As I use
oh my zshon my Mac, I open the.zshrcfile usingvi .zshrcand add an envrionment:
1 | # JavaFX |
- We can compile files by adding the modules:
1 | javac --module-path $PATH_TO_FX |
- Likewise for the commands
javaandjavadocneed to be extended. Therefore, you may want to use aliases. To add aliases, go to the folder~/.oh-my-zsh/customand create a new.zshfile(I usealiases.zsh), then add aliases to this file:

- Now we can compile and run Java files using JavaFX:
