Java FX Manual Google Docs

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 1

2/11/2019 JavaFX Manual - Google Docs
https://docs.google.com/document/d/1Se-OgD6e6yJ7OtCm-FVOUCJrbMiqFRyd0-0zmEDyjPI/edit 1/1
JavaFX Manual
Installation guide to JavaFX & Java 11
New Austrian Coding School
In order to work with JavaFX we need to install Java 11.
Installing Java 11 :
Open your terminal and run this command:
sudo apt install openjdk-11-jdk
Installing JavaFX :
Download JavaFX through THIS LINK
Unzip the files into a folder where you can easily find it again.
The unzipped folder will be called “ j avafx-sdk-11.0.1 ”
Create a JavaFX project on IntelliJ:
Open IntelliJ
Create New Project
in the left column select the JavaFX preset. On the right column click on NEW.. beside the
Project SDK field and locate the java-11-openjdk/lib folder.
The path will look something like this: /usr/lib/jvm/java-11-openjdk/lib
type in a name and where you want to save the project (the project will open now)
go to File → Project Structure → Modules then go to the Dependencies tab and click the +
symbol
select JARs or directories → navigate to the previously downloaded j avafx-sdk-11.0.1 folder
and select the /lib folder inside. Then click open. Click OK to close the Project Structure
window
next, go to Run → Edit Configurations.. copy the following line and replace the
path/to/javafx-sdk-11.0.1/lib ” with the path to where your j avafx-sdk-11.0.1 folder is located.
Then paste the final command into the VM Options field.
--module-path /path/to/javafx-sdk-11.0.1/lib --add-modules=javafx.controls,javafx.fxml
Click OK and that’s it.
You can now run the Main class inside the /src/samples/ folder and it should open a blank
window with a title of “Hello World”.
If the window opens everything worked!

Navigation menu