I recently installed JRE 8 and JDK 8 to use Greenfoot in Ubuntu 18.04.
I know the majority of my Java install works (I can write code in atom and run it with scripts). However, when I try to launch greenfoot in the terminal, I get the following:
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at bluej.Boot.main(Boot.java:193)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more
It appears to be an issue with greenfoot not being able to find and run the JavaFX classes. From my understanding, JavaFX install comes with JRE 8.
Does JavaFX come with the default JRE 8 and JDK 8 installs? Do I need to point greenfoot to the JavaFX locations?
Even if you are not familiar with greenfoot, any help would be appreciated. I saw other posts that seemed to be dealing with a similar issue but was not sure how to apply the fix at all in my situation.
Please help!