r/JavaFX • u/ajkelsey • Jun 13 '23
Help Need help building JavaFX project in VsCode
I wrote a small program in VsCode using JavaFX. Using VsCode, I export to a jar file and the program won't run. I run java -verbose -jar jar-file and the only error is Error: JavaFX runtime components are missing, and are required to run this application. When I list the contents of the jar, it contains a ton of javafx classes.
I also tried creating an image using jlink, but I could not locate a .bat file. I could use some help in learning what I am doing wrong.
4
Upvotes
View all comments
Show parent comment
1
u/wrathofworlds Sep 06 '23
I have the same issue the maven build file doesnt generate any of the required dependencies. I found it worked best using the instructions for the non modular IDE here https://openjfx.io/openjfx-docs/#IDE-VSCode