02 March 2021

Our team recently upgraded to Fedora 33. After the upgrade some team members started experiencing odd errors compiling our project using Maven. Turns out that Fedora 33 defaults to JDK 11. JDK 11 had some libraries removed that are included in JDK 8. Even uninstalling JDK 11 didn’t resolve the issue. We performed the following.

Run the following command and select Java/JDK 8.

Configure Java 8 as default.
$ sudo alternatives --config java

Verify Java 8 is the default.

Check Java 8 is default.
$ java -version

Verify Maven is using JDK 8.

Verify Maven is using Java 8.
$ mvn -v

If Maven is still using JDK 11 add the following to the end of your ~/.bashrc file.

Add to .bashrc
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk

Less Is More ~ Older posts are available in the archive.