Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to create a JavaFX project within another project and open it in IntelliJ

I wanna add JavaFX to an existing project in IntelliJ and followed this documentation.

I created a folder structure with an folder with an JavaFX project in it. If I open only this folder who contains JavaFX within IntelliJ everything gets imported correctly and the sample main is running. If I open the whole project where the folder with JavaFX is an subfolder only I get a lot of red and running the main results in many errors. How can I open a JavaFX project within another project in IntelliJ?

IntelliJ Project structure if it does work

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

GUI
+-- JavaFXRelatedFiles

IntelliJ Project structure if it does not work

+-- src
|   +-- GUI
|   +-- OtherFolder

>Solution :

Choose File | New Module... instead of File | New Project....

The setup of the new module after that will be similar to the new project, so you can just follow the instructions you linked for creating a new JavaFX project.

If you want to link the multiple modules together with a Maven build, that is much more complex, so I won’t describe that process here.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading