Fedora 33 upgrade defaults Java to JDK 11
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.
$ sudo alternatives --config java
Verify Java 8 is the default.
$ java -version
Verify Maven is using JDK 8.
$ mvn -v
If Maven is still using JDK 11 add the following to the end of your ~/.bashrc file.