Installation error on Fedora

I am getting the following error when I try to install VASSAL 3.6.19 on Fedora 38. The full text is:

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

Running “java --version” in the terminal produces:

openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment (Red_Hat-17.0.7.0.7-4.fc38) (build 17.0.7+7)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.7.0.7-4.fc38) (build 17.0.7+7, mixed mode, sharing)

Running “rpm -qa | grep openjdk” in the terminal produces:

java-17-openjdk-headless-17.0.7.0.7-5.fc38.x86_64
java-1.8.0-openjdk-headless-1.8.0.362.b09-2.fc38.x86_64
java-1.8.0-openjdk-1.8.0.362.b09-2.fc38.x86_64

I also have tried adding this to VASSAL.sh:

INSTALL_DIR=$(cd “$(dirname “$0”)”; pwd)

Thanks for any suggestions.

UPDATE: I also found this in the errorLog-3.6.19 file in ~/.VASSAL:

2023-07-01 01:08:16,610 [121906-main] ERROR VASSAL.tools.ErrorDialog - 
java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-17-openjdk-17.0.7.0.7-5.fc38.x86_64/lib/libawt_xawt.so

There is a libawt_headless.so and a libawt.so in that directory, but not a libawt_xawt.so.

You need to install the full version of the Java 11 (or later) JRE; it looks like you currently have the full version of Java 8 (which is too old for VASSAL later than 3.2.x) and a headless version of Java 17 (which lacks any ability to use graphics). I don’t know the details of using RPM packages, so I’ll leave that for you to figure out (I use Kubuntu, personally), or someone else might be able to help.

dnf install java-latest-openjdk will give you a full (headed) build of the current version of Java.

If you’d like Java 17 specifically, run dnf install java-17-openjdk instead.

(You might also need to run alternatives --config java after installing java, in order to select the version you just installed as the default.)

Works perfectly. Thanks!

1 Like