Closed noraj closed 1 year ago
The --module-path should be your JavaFX SDK path instead of OpenJDK lib path.
Maybe Mindolph works only with Oracle JDX and JavaFX (Oracle JDK commercially licensed build of OpenJFX) and not with OpenJDK / OpenJFX?
I see, I have tried OpenJDK 19 with JavaFX 17 on macOS but it was OK, let me try it on Linux once I have chance. BTW, which Linux distribution are you using?
I'm using ArchLinux. I see in various places that OpenJFX home is commonly ${JAVA_HOME}/lib/
.
I copied the OpenJFX files in a temporary directory and it works.
$ tmpfolder=$(mktemp -d)
$ cp $(pacman -Ql java-openjfx | grep -E /usr/lib/jvm/java-19-openjdk/lib/.+ | cut -f 2 -d ' ') $tmpfolder
$ java --module-path $tmpfolder --add-modules java.sql,javafx.controls,javafx.fxml,javafx.swing,javafx.web -jar /tmp/Mindolph-1.0.jar
So the issue is that the OpenJDK libraries and OpenJFX ones are in the same folder.
But why do I even have to specify the path and modules for Mindolph? For example AsciidocFX that also relies on JavaFX/OpenJFX I don't need to provide the JFX path.
$ wget https://github.com/asciidocfx/AsciidocFX/releases/download/v1.8.4/AsciidocFX_Linux.tar.gz
$ tar xaf AsciidocFX_Linux.tar.gz
$ ./AsciidocFX/AsciidocFX
Another example with Recaf:
$ wget https://github.com/Col-E/Recaf/releases/download/2.21.13/recaf-2.21.13-J8-jar-with-dependencies.jar
$ java -jar recaf-2.21.13-J8-jar-with-dependencies.jar
The reason why AsciidocFX doesn't need --module-path is it is bundled with JFX libraries for Linux, so you can launch the jar without providing JFX path. Actually I can run Mindolph-1.0.jar without that path on my macOS because it was built with libraries for macOS, maybe I would release the jar file with Linux JFX libraries in next version.
For Recaf, I did some research but I don't know why it doesn't need any JFX path specified on any platform, I guess it is because of the java 8 libraries but I'm not sure about it.
I have this issue with OpenJDK / OpenJFX version 19 and 17.