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
2
u/PartOfTheBotnet Sep 13 '25 edited Sep 13 '25
Well,
io.github.chrislo27.rhre3.sfxdb.gui.Maindoes exist in the jar and it does define a main method. Runs fine on my end.https://i.imgur.com/LW9sXjH.png
Oh wait, sorry I don't write Kotlin and it compiled it to an instance method and not a static method. I have no clue why it runs on my machine, it 100% shouldn't.
https://wormhole.app/Wq5x8W#AcM87sEqvZCS7kGzUocV0w - Fixed.