java.lang.NoClassDefFoundError: javafx/application/Application error
kieranjol opened this issue · 4 comments
kieranjol commented
Hi,
I am using Ubuntu 16.04.4. I get a NoClassDefFoundError
when I run java -jar ~/Downloads/rodain-app-2.1.0-beta.7_OtherOS.jar
, and double clicking the jar file just does nothing.
java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
here were the java versions that I installed (probably too many):
sudo apt install openjdk-8-jre-headless
sudo apt-get install default-jre
sudo apt-get install default-jdk
I get this error when I run roda-in:
java -jar ~/Downloads/rodain-app-2.1.0-beta.7_OtherOS.jar
2018-03-15 13:00:26,885 [main] WARN o.r.r.core.utils.LoggingOutputStream - Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
2018-03-15 13:00:26,889 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.lang.ClassLoader.defineClass1(Native Method)
2018-03-15 13:00:26,889 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
2018-03-15 13:00:26,889 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
2018-03-15 13:00:26,890 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
2018-03-15 13:00:26,890 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
2018-03-15 13:00:26,890 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
2018-03-15 13:00:26,890 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
2018-03-15 13:00:26,891 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.security.AccessController.doPrivileged(Native Method)
2018-03-15 13:00:26,891 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
2018-03-15 13:00:26,891 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
2018-03-15 13:00:26,892 [main] WARN o.r.r.core.utils.LoggingOutputStream - at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
2018-03-15 13:00:26,892 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
2018-03-15 13:00:26,892 [main] WARN o.r.r.core.utils.LoggingOutputStream - at org.roda.rodain.Main.main(Main.java:33)
2018-03-15 13:00:26,893 [main] WARN o.r.r.core.utils.LoggingOutputStream - Caused by: java.lang.ClassNotFoundException: javafx.application.Application
2018-03-15 13:00:26,893 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
2018-03-15 13:00:26,893 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
2018-03-15 13:00:26,893 [main] WARN o.r.r.core.utils.LoggingOutputStream - at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
2018-03-15 13:00:26,893 [main] WARN o.r.r.core.utils.LoggingOutputStream - at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
2018-03-15 13:00:26,893 [main] WARN o.r.r.core.utils.LoggingOutputStream - ... 13 more
luis100 commented
You are missing javafx, can you try installing:
sudo apt install openjfx
kieranjol commented
That fixed it, thanks! Would that have been installed as expected if I had downloaded from https://www.java.com/en/download/linux_manual.jsp? As such, is there any need to add this to the readme?
luis100 commented
I think it is installed by default when using Oracle Java, but it may not be the case when installing OpenJDK.