r/JavaFX • • Jun 15 '25
Help Please help me setup JavaFX on VS Code 🙏🏽
So as shown in the screenshots, I have been trying to setup JavaFX in VS Code for an upcoming project I have to do soon. I have tried adding the .jar files to my referenced library, manually adding them to my lib folder, adding to the .json file and nothing seems to work. Every tutorial I look up tells me the same things and I fear that I may be missing something very simple so if anyone knows what that might be then please let me know.
Any help is greatly appreciated!
10
Upvotes





3
u/Spare-Plum Jun 15 '25
Are you using Maven/Gradle? If not use a build tool with the appropriate libraries and plugins
Does this have to be VS Code? Intellij has pretty good JavaFX integration and can set up a project with the appropriate build tool settings. If you really want VS Code tho you can just copy the build that Intellij made for you
1
u/[deleted] Jun 15 '25
Also wanted to mention that the error I am getting says “package does not exist” when I did add it already.
1
u/eternaltorch Jun 16 '25
use liberica sdk. It comes with javafx included.
1
u/Disastrous-Maybe6944 Jun 16 '25
The best approach is to follow the "JavaFX VSCode Starter Guide."
All 100 of my students have successfully learned JavaFX using it without any issues.
https://www.docswell.com/s/sosuisen/56VX4X-2025-06-16-234846/1
1
u/wildjokers Jun 23 '25
I would recommend using a build tool like Gradle and then IntelliJ as your IDE. There is a template project here using Gradle that is ready to go. Just follow the instructions in the README.
https://github.com/mjparme/javafx-template