Worldographer won't launch with OpenJDK

Home Forums Worldographer Worldographer won't launch with OpenJDK

Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #9465
    Anonymous
    Inactive

    Since Oracle will no longer supporting OracleJDK for free, I’ve been switching over to OpenJDK. However, for some reason Worldographer doesn’t launch when I run it using OpenJDK 1.8 (though Hexographer will).

    Error:
    ######:~/worldographer$ java -jar worldographer.jar
    Error: Could not find or load main class com.inkwellideas.ographer.ui.Worldographer

    Java:
    ######:~/worldographer$ java -version
    openjdk version “1.8.0_222″
    OpenJDK Runtime Environment (Zulu 8.40.0.25-CA-linux64) (build 1.8.0_222-b10)
    OpenJDK 64-Bit Server VM (Zulu 8.40.0.25-CA-linux64) (build 25.222-b10, mixed mode)

    I do have OpenJFX installed:
    ######:~/worldographer$ apt list openjfx
    Listing… Done
    openjfx/xenial,now 8u60-b27-4 amd64 [installed]

    OS:
    ######:~/worldographer$ cat /etc/os-release
    NAME=”Ubuntu”
    VERSION=”16.04.6 LTS (Xenial Xerus)”
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME=”Ubuntu 16.04.6 LTS”
    VERSION_ID=”16.04″
    HOME_URL=”http://www.ubuntu.com/”
    SUPPORT_URL=”http://help.ubuntu.com/”
    BUG_REPORT_URL=”http://bugs.launchpad.net/ubuntu/”
    VERSION_CODENAME=xenial
    UBUNTU_CODENAME=xenial

    Kernal:
    ######:~/worldographer$ uname -r
    4.15.0-55-generic

    #9505
    Joe
    Keymaster

    I was on vacation when this was posted, and I’m sorry I missed it until now.

    This is mostly likely caused by the split of Java removing Javafx after Java 8. I’m hoping to include the javafx jars in the next update of Worldographer so we can move past Java 8. You can install Java 8, or I can send you a command line for how to include the needed jars (I don’t want to post it here because it is very long with lots of paths and needs to be customized.) Please email support at inkwellideas dot com if you want it now.

    #9896
    Anonymous
    Inactive

    Sorry to necro the thread, but this shows in search results when searching for “Error: Could not find or load main class com.inkwellideas.ographer.ui.Worldographer” so I thought I would chime in with the incantation that worked for me. I had to do a little fiddling from the instructions on http://worldographer.com/download/

    This is on Debian buster with AdoptOpenJDK-11 and OpenJFX installed from repos. Paths to openjfx libs and jars may differ depending on your install (find e.g. javafx.*.jar for what is probably the right path).

    java --module-path /usr/share/openjfx/lib/ --add-modules=javafx.controls,javafx.fxml,javafx.web -XX:MaxRAMPercentage=70 -Dprism.maxvram=2G --add-exports=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED -Dfile.encoding=UTF-8 -classpath /usr/share/openjfx/lib/javafx.base.jar:/usr/share/openjfx/lib/javafx.controls.jar:/usr/share/openjfx/lib/javafx.fxml.jar:/usr/share/openjfx/lib/javafx.graphics.jar:/usr/share/openjfx/lib/javafx.media.jar:/usr/share/openjfx/lib/javafx.swing.jar:/usr/share/openjfx/lib/javafx.web.jar -jar <path-to>/worldographer.jar

    Thanks and cheers

    #9919
    Joe
    Keymaster

    Thank you! I’m not able to test on linux not I’m not much of a linux expert as well. Especially as it seems it can vary based on the distribution. 🙁

    #9924
    Anonymous
    Inactive

    Thank you, thank you, thank you! I’ve been trying to get Worldographer running under Linux but have had no luck. I’ve had to resort to booting back to Windows when I need to edit a map. 🙂

    Your solution worked perfectly under Ubuntu 19.04 — no edits necessary other than setting the path to worldographer.jar.

    Thank you again for taking the time to post your solution.

    #10040
    Anonymous
    Inactive

    One more bump — I didn’t list all of the JFX/OpenJFX jars, and so some image load/save functionality wasn’t working right, though Worldographer would otherwise run. Here’s my current functional argument list:

    java -Djavafx.verbose=true -Dprism.verbose=true -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni/ --module-path /usr/share/openjfx/lib/ --add-modules=javafx.controls,javafx.fxml,javafx.web,javafx.swing,javafx.media,javafx.graphics -XX:MaxRAMPercentage=70 -Dprism.maxvram=2G --add-exports=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED -Dfile.encoding=UTF-8 -classpath /usr/share/openjfx/lib/javafx.base.jar:/usr/share/openjfx/lib/javafx.controls.jar:/usr/share/openjfx/lib/javafx.fxml.jar:/usr/share/openjfx/lib/javafx.graphics.jar:/usr/share/openjfx/lib/javafx.media.jar:/usr/share/openjfx/lib/javafx.swing.jar:/usr/share/openjfx/lib/javafx.web.jar -jar <path-to>/worldographer.jar

    Glad this was able to help others out. 😀

    #10045
    Anonymous
    Inactive

    Just to mention I could not get Worldographer to work on Debian 10 (buster) with Oracle Java 14, but I could with openJDK 11 and openJFX using the above command, although I found the -classpath unnecessary (I think the –add-module qualifier does this anyway)

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.