Installing Java and JavaFX
Install Java 23 JDK
- Download Windows/x64
.msi
build from here (be sure to click on the Java 23 tab to ensure you are getting the correct version) - Open the
.msi
file to install JDK23
Install JavaFX 23
- Download x64 JavaFX 23 Windows SDK from here and unzip the file
- Select Windows for the Operating System
- Select x64 for the Architecture
- Select SDK for the Type
- Copy the
javafx-sdk-23.0.1
1 folder from the.zip
file toC:\Program Files\Java\
Install Scene Builder 23.0.0
- Download Scene Builder Windows Installer from here
- Open the
.msi
file to install Scene Builder
Configure IntelliJ
Set the Project SDK
- Go to File -> New Projects Setup -> Structure
- Select Project under Project Settings on the left side
- Set SDK to 23 (if available); otherwise:
- Click Add SDK
- Select JDK and browse to
C:\Program Files\Java\jdk-23.0.1
2
- Under Project language level select SDK default
- Click OK
Add JavaFX to Global Library
- Go to File -> New Projects Setup -> Structure
- Select Global Libraries under Platform Settings on the left side
- Click the + (plus symbol) in the upper left of the second column
- Select Java from the menu
- Browse to
C:\Program Files\Java\javafx-sdk-23.0.1\lib
(adjust to match version) - Change Name from lib to javafx
- Click OK twice
Set Run Configuration Template for Application
- Go to File -> New Projects Setup -> Run Configuration Templates...
- Select Application
- Click Modify options (or type Alt+M) and ensure Add VM options is checked
- Paste the following in VM options:
--module-path "C:\Program Files\Java\javafx-sdk-23.0.1\lib" --add-modules=javafx.controls,javafx.fxml
- Here too, ensure that the version number matches what you downloaded
- Click OK
New IntelliJ Project
All of the steps above must be implemented once, but you'll need to do the following for each new IntelliJ project.
- Create a Java (not JavaFX) project, if you create a JavaFX project, you will need to set the run configuration (as described above).
Add the JavaFX SDK library
- Go to File -> Project Structure... (CTRL+ALT+SHIFT+S)
- Select Modules
- Open the Dependencies tab and click +
- Select Library...
- Within your JavaFX installation, select the javafx folder.
- Click Add Selected and then OK
1
You may need to update the version number on the javafx-sdk in a similar way to a JDK version change.
2
If the version of the JDK is different, you will need to use the new version number in the rest of the instructions. E.g., if the version of JDK is 23.0.2, you should replace jdk-23.0.1
with jdk-23.0.2
.