-Create New Project: Select JavaFX, Select JDK or Download it
Next and Finish
-Now Right click on your project, and Open Module Settings as
-Select Libraries, add new Module as
-Click on Java then OpenFile Dialog will open.
Now select the path to your JavaFX lib folder, in my case it is
And then apply
Upto here, we have added JSDK, JavaFX SDK. But we need to add VM options.
So goto Documentation here
In Section 4 of this document, you will find ADD VM options
Copy this line from there as
--module-path "\path\to\javafx-sdk-17\lib" --add-modules javafx.controls,javafx.fxml
Now in your IntelliJ project, Click Run and Edit Configurations as
Click Modify options
Then Select Add VM options
Paste the above copied line here in VM options
Remember to paste path to your Javafx SDK in VM option as
-Create New Project: Select JavaFX, Select JDK or Download it
Next and Finish
-Now Right click on your project, and Open Module Settings as
-Select Libraries, add new Module as
-Click on Java then OpenFile Dialog will open. Now select the path to your JavaFX lib folder, in my case it is
And then apply
Upto here, we have added JSDK, JavaFX SDK. But we need to add VM options. So goto Documentation here In Section 4 of this document, you will find ADD VM options
Copy this line from there as
--module-path "\path\to\javafx-sdk-17\lib" --add-modules javafx.controls,javafx.fxml
Now in your IntelliJ project, Click Run and Edit Configurations as
Click Modify options
Then Select Add VM options
Paste the above copied line here in VM options
Remember to paste path to your Javafx SDK in VM option as
--module-path "\path\to\javafx-sdk-17\lib" --add-modules javafx.controls,javafx.fxml
Should Become in my case
--module-path "E:\Softwares\JavaFX\javafx-sdk-17.0.0.1\lib" --add-modules javafx.controls,javafx.fxml
So paste this line in VM options. No apply and you are ready to run your first JavaFX app in IntelliJ.