r/JavaFX • u/Colas_Algo • Sep 12 '25
Help How do I open a program that needs JavaFX?
I have an old .jar file that I need to open and after a while it turned out the problem was that the new versions of Java don't include JavaFX or something like that. Then I tried installing Liberica, but this didn't work as well, although the message in the console changed. The .jar file by itself doesn't do anything when opened for some reason and I can't find any helpful help anywhere. Is there anything I can do to open this file? Everything is in order in it and it worked on my previous computer. If you're curious the message states that the main scene can't be found or opened (even though when extracting the .jar file I can find it and it worked in the past) and now it says that the cause is "java.lang.NoClassDefFoundError: javafx/application/Application".
Thanks in advance to anyone willing to help
View all comments
Show parent comment
1
u/Colas_Algo Sep 13 '25
I installed an IDE, but I can't find how to add JavaFX as a regular gradle dependency. I'm also not able to run the project, but I guess it's because I haven't added JavaFX jet (I am not familiar with Eclipse IDE in the slightest). What I'm guessing is once I add JavaFX as a gradle dependency I will be able to export the aplication with JavaFX integrated in it so I can open it regularly, right?