Worldographer won't launch with OpenJDK
Home › Forums › Worldographer › Worldographer won't launch with OpenJDK
- This topic has 6 replies, 5 voices, and was last updated 3 years, 10 months ago by Anonymous.
-
AuthorPosts
-
14 August 2019 at 2:08 pm #9465AnonymousInactive
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.WorldographerJava:
######:~/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=xenialKernal:
######:~/worldographer$ uname -r
4.15.0-55-generic11 September 2019 at 4:45 pm #9505JoeKeymasterI 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.
19 March 2020 at 10:12 pm #9896AnonymousInactiveSorry 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
26 March 2020 at 10:29 am #9919JoeKeymasterThank 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. 🙁
28 March 2020 at 7:00 pm #9924AnonymousInactiveThank 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.
7 May 2020 at 1:04 am #10040AnonymousInactiveOne 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. 😀
8 May 2020 at 11:34 am #10045AnonymousInactiveJust 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)
-
AuthorPosts
- You must be logged in to reply to this topic.