Can't run java application

Good afternoon, I can not start the application with the extension .jar
I’m a completely new user, I don’t know a lot, but I’m trying to learn.
I will be glad for your help :slight_smile:

Console

$ java -jar XRemote_Server_1.8.jar
Exception in thread “main” java.lang.NoClassDefFoundError: javafx/application/Application
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at com.crazyxacker.apps.xremotepc.Main.main(Main.java:9)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
… 10 more

If the application itself throws errors - you need to contact the developer or consider if you are using the correct runtime as some Java applications are coded for at specific version of Java.

1 Like

Thanks for the quick response!
Unfortunately, the problem persists, I did everything from the branch that you sent. The application should work, as it will definitely run on Windows.

This post was flagged by the community and is temporarily hidden.

Have you considered if the application itself is relying on some Windows only functionality? That is entirely possible - you know?

Did not know
I thought if there was only one file in the .jar format, then it is multiplatform, it turns out it is not. Thank you very much for your reply and I apologize for your time.

Java FX is no longer packaged with the Java runtime. see https://askubuntu.com/questions/1136420/java-lang-noclassdeffounderror-javafx-application-application

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.