Menu

#67 kmttg 2.4j won't launch with OpenJDK 11.0.1

1.0
open
nobody
None
2020-10-27
2018-11-03
o3d
No

Since Oracle changed the license for Java 11, I tried running 2.4j using the prebuilt binaries at https://jdk.java.net/11/.

After adjusting $JAVA_HOME and pointing the kmttg launch script at the correct java binary, upon launch I get:

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
Shutdown hook executing

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "Thread-0"

2.4j runs fine under java 10.0.2.

Is there an easy workaround or is there a planned fix?

Thanks.

Discussion

  • Kevin Moye

    Kevin Moye - 2018-11-06

    As stated in Wikis for Mac and/or Linux, OpenJDK is not shipped with JavaFX component which is required for kmttg. So if you must use OpenJDK then you also need to install JavaFX component for it as well. Else you need to use Oracle Java which does include JavaFX by default.

     
    👍
    1
  • Eric

    Eric - 2018-12-11

    I have the oracle version of Jave version jdk-11.0.1. I have set the path variable and I am still getting the same error as above. This should hae the JavaFX controls in it so I am wondering what I am missing?

    eekstra@linux1:~$ ~/kmttg/kmttg

    Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
    Shutdown hook executing

    Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "Thread-0"

    _________--

    export PATH=/home/eekstra/java/jdk-11.0.1/bin:$PATH

     
  • Frank Tito

    Frank Tito - 2019-09-18

    I've run across this a few times using KMTTG on Linux platforms. This is my go-to solution for resolving the conflict: http://ask.xmodulo.com/change-default-java-version-linux.html (change default Java version)

     
    • Phantom of Krankor

      Unfortunately, that link is dead.

      I've installed different fx's, and still can't get kmttg to launch, so being able to switxch successfully would be really helpful.

      openjfx-8.0.202-12.b07.fc32.x86_64
      java-1.8.0-openjdk-openjfx-1.8.0.265.b01-1.fc32.x86_64

       
  • Brian Engert

    Brian Engert - 2020-05-10

    It would be helpful to add a check and display a user friendly message about the lack of javafax. I've attached a patch that does just that. If you think it would be of use I could also look at refactoring config.java so headless opperations can work without javafx.

     

Log in to post a comment.