mcaselector
mcaselector copied to clipboard
Java fx error although it's installed
Describe the bug I installed Java and jfx (the latest version on arch repo)but it started showing the error to install jfx for my Java version although I installed it 2 sec ago
To Reproduce Install Java fx 16 And java 16 Then run the editor
Expected behavior Run without errors!
- OS: archlinux
- Java version:16.0.2
- Version of MCA Selector 1.16.3
Having same issue on Manjaro, new MCA Selector showing this error:
$ java --module-path /usr/lib/jvm/java-16-openjdk/lib --add-modules ALL-MODULE-PATH -jar mcaselector-1.16.3.jar
Error occurred during initialization of boot layer
java.lang.LayerInstantiationException: Package jdk.internal.jimage.decompressor in both module jrt.fs and module java.base
So I included only needed modules:
java --module-path /usr/lib/jvm/java-16-openjdk/lib/javafx.base.jar:/usr/lib/jvm/java-16-openjdk/lib/javafx.controls.jar:/usr/lib/jvm/java-16-openjdk/lib/javafx.graphics.jar:/usr/lib/jvm/java-16-openjdk/lib/javafx.swing.jar \
--add-modules javafx.base,javafx.controls,javafx.graphics,javafx.swing \
-jar mcaselector-1.16.3.jar
It runs fine. I'm not tested everything, maybe it needs extra modules to work properly.
To be honest, it took me some time to install it, but it worked perfectly for me. What I did notice that you installed JavaFX 16 before you installed Java 16??? Anyway, I used this guide online on how to install it (https://faculty.ncssm.edu/~morrison/resources/java). Scroll down to installing the JavaFX JDK. I don't know if it will work for you but for me it did. Also you dont really describe what you did, I mean, 'installing' it isn't really installing, it's just adding modules to it
Since you're on Arch, use the AUR repository of MCA Selector. It will install all needed dependencies.
The package: https://aur.archlinux.org/packages/mcaselector/
To install: yay -S mcaselector
(If you use YAY.)
To install YAY, if you're a noob: sudo pacman -S yay
It also works on java 17 on windows with eclipse Hotspot. Binaries come from adoptium.net
I tried to do this for java 18, and it doesn't work. It throws the following error when only specifying the java.base
module:
Error occurred during initialization of boot layer
java.lang.LayerInstantiationException: Package jdk.internal.jimage in both module java.base and module jrt.fs
❯ java -version
NOTE: Picked up JDK_JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
openjdk version "18.0.1" 2022-04-19
OpenJDK Runtime Environment Temurin-18.0.1+10 (build 18.0.1+10)
OpenJDK 64-Bit Server VM Temurin-18.0.1+10 (build 18.0.1+10, mixed mode, sharing)
Using Java (jdk-temurin) and Java FX (zulu18.30.11-ca-fx-jdk18.0.1-linux.x86_64.tar.gz) on Arch Linux.