This site requires JavaScript, please enable it in your browser!
Greenfoot back
tomahok
tomahok wrote ...

2019/5/25

Greenfoot won't launch JavaFX error (Ubuntu 18.04)

tomahok tomahok

2019/5/25

#
When I try to launch Greenfoot from the terminal, I get the following result: (base) griffith@griffith-Latitude-5491:~$ greenfoot 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 looks like Greenfoot is not finding the javafx applications on my computer. From my understanding, javaFX is installed along with the java8 JDK. Is there a way I can point greenfoot to the JavaFX installation? Do I need to install or modify JavaFX installs separately? Any help at all would be appreciated.
Super_Hippo Super_Hippo

2019/5/25

#
tomahok tomahok

2019/5/26

#
Okay. I feel like an idiot. But here are the things to try if you also have this problem: * Make sure you downloaded the oracle version of JDK8 (you only need the JDK), the version you download via apt does not have FX (I believe). * Make sure your greenfoot installation is using the oracle JDK8 * Try using the pure java version. This allows you to specify where your JDK install is, making it easy to choose the oracle JDK.
Super_Hippo Super_Hippo

2019/5/26

#
So it works for you again?
You need to login to post a reply.