mcaselector: Crash on run with OpenJDK Java 8
Running the jar using OpenJDK Java 8 rather than the Oracle’s Java 8 crashes immediately, with the exception:
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/scene/paint/Color
at net.querz.mcaselector.Config.<clinit>(Config.java:12)
at net.querz.mcaselector.Main.main(Main.java:11)
Caused by: java.lang.ClassNotFoundException: javafx.scene.paint.Color
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)
... 2 more
It’s not clear whether this error is due to the use of OpenJDK or if you intend to support anything other than Oracle-brewed Java, but thought I would post this here.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (7 by maintainers)
I beg your forgiveness for replying to a closed issue, but I also had this problem and I found a solution that I want to share. The problem seems to be that the current releases of Debian and its derivatives like Ubuntu ship with OpenJDK 11 as the standard Java version. Although they provide optional OpenJDK 8 packages in their official repositories, their only package for OpenJFX is version 11. To make matters worse, their OpenJDK 11 and OpenJFX 11 have a version mismatch. The former ist version 11.0.3, whereas the latter is version 11.0.2. I don’t know if that can create issues with Java 11 applications.
Fortunately, I found a solution for Ubuntu 18.04.x in comment #18 of this bugreport that works for me:
edit: There’s a simpler solution now, see here. Tested today on Ubuntu MATE 20.04.
Thanks! I personally never had the time to tinker too much with Debian, so I’m glad that someone figured this out. I merged #7 and I consider this as solved then 😃