New JavaFX projects do not automatically generate run configuration on Main method

Answered

EDIT: Problem solved after many tries

Mark java directory as Sources root

Mark resources directory as Resources root 

Add relative dependencies in Project Structure>Libraries (from Maven or manually download)

Edit custom VM options: add

--module-path ${PATH_TO_FX} --add-modules=javafx.controls,javafx.fxml

Add run configuration> add Helloapplication in the file hierarchy

run

---------------------------------------------------

When I create a JavaFX project, the IDE do not automaticallly generate a run configuration and a green arrow on the Main function. In the tutorials the run config is automatically generated and is not mentioned.

And I cannot manually add a run configuration since it do not allow me to select the main class:

The OK button is disabled.

(someone claimed I should mark directory as sources root, it do not make sense and cause compile errors by "cannot find javafx".)

Reinstall the IDE do not work.

0
1 comment

Looks like after creation IDE does not import project as Maven automatically for some reason. Maybe I could find some some error in log. Could you please provide IDE logs (Help | Collect Logs and Diagnostic Data action). It would also be nice if you can indicate the time when issue happened. Thank you.

For uploading you can use https://uploads.jetbrains.com or any file sharing service.

0

Please sign in to leave a comment.