How to setup JavaFX 11+ with IntelliJ on Windows [2022]

preview_player
Показать описание
In this tutorial, I will demonstrate how to setup JavaFx with IntelliJ. JavaFX is a library used with java to create some fast and simple GUI, it is simple to use and you can get something working very fast.

If you got any problems please let me know in the comments.

In this tutorial I will be using a few sites:
JavaFX download:

VM options:
--module-path
/path/to/javafx/sdk

IntelliJs page about settingup JavaFx:
Рекомендации по теме
Комментарии
Автор

Thank you for the amazing tutorial! I almost gave up on fx v.v
In case someone else has trouble with the VM options path: Java doesn't like spaces in it.. I had the library in "Program Files" first and Java wasn't able to find it. After moving it to a different location it works perfectly <3

marshmallow
Автор

Thanks a lot!
By the way if you get "Error: Could not find or load main class ..." even after this instructions check if there's spaces in your pathname. In that case surround your pathname with double quotes like this : "C:\Program and it should work just fine.

temari
Автор

You're awesome, finally my javafx run❤💜💜💜🌷🌷🌷🌷

raymaki
Автор

Thank yo for this video, I have watched a few already but still could not get this to work. Yours was clear and to the point and now I have JavaFx up and running. Now that the hard part is out of the way....

bentfrog
Автор

you are a life saver.. thank you very much <3

Rash_Vibe
Автор

Thank's a lot! I was about throw my computer out and drop out of CompSci in fury...

augustmarshall
Автор

Thank you for your video. For some reason when I did this, I end up not having a main and controller class. How can I set up them?

cleogao
Автор

If it helps -> IntelliJ Version 2020.3. - I have to add SDK in Libraries and Modules/Dependencies as well.
about VM path is located Run/ AddConfigurations/ Modify Options/ Add VM Options.
Good Luck 😎

bacanalienigena
Автор

Hello! why is your Main.java have this minimal lines of code while i have alot and i dont understand them?

bucztechph
Автор

Thanks a lot for the nice tutorial. How can I get lower version of javafx sdk? from javafx-sdk-15, javafx 14, javafx 13 and lower

robertkisiri
Автор

Hi, this one works, but I keep doing the same thing everytime I create a new project
Any solution?

wyndhamkeith
Автор

“libprism_es2.dylib” cannot be opened because the developer cannot be verified. I'm getting this error at last.

livinglifetothefullest
Автор

the box does not open after following all the steps

priyanshragit
Автор

i use intellij 2020.3 with javafx 16 and it doesnt work. followed exactly all steps but i do keep getting errors

SypEX-vzui
Автор

Hey, any idea why my red underlines don't go away after 2:24? I followed all the steps :(

hanasschoolwork
Автор

Hello, thanks for this great tutorial, it is very helpful. But I have one question. I have downloaded IntelliJ and if I click on Open New Project and choose JavaFX I have only the choice between Maven and Gradle, but I don´t want to use any of them. Is it a restriction of the newest IntelliJ IDE?

technicalpublishing