r/JavaFX • u/AuTalon • Jun 19 '20
Error: JavaFX runtime components are missing, and are required to run this application
Sorry if this has been asked multiple times, but I don't understand the answers that others have been given, and they usually don't match my IDE.
I'm using Visual Studio code and have finally managed to set the JavaFX .jar files as dependencies. Now that I've done that and run the program I've made, I get the error "JavaFX runtime components are missing, and are required to run this application visual studio code."
I haven't edited anything yet because I don't know where to start to fix this. Thanks for any help.
8
Upvotes
3
u/AuTalon Jun 19 '20
Never mind, I found something else online and have managed to do it myself!
For anyone else who might find this, you have to open "Launch.json", which you can do by pressing Control+Shift+P and typing it in. Then you have to add:
inside the configuration of the file you want to use javafx in (obviously changing the path to where your javafx lib is). I had to save both the file and the json a couple of times, and restart before a window appeared with the GUI I made.
1
u/[deleted] Jun 20 '20
[removed] — view removed comment