I get this error when running my Java
application
Global : Unsupported major.minor version 52.0
When I checked my Java
version, I found that it was different from the compiler version
java -version
# java version "1.7.0_65"
# OpenJDK Runtime Environment (IcedTea 2.5.1) (7u65-2.5.1-4ubuntu1~0.12.04.2)
# OpenJDK Server VM (build 24.65-b04, mixed mode)
javac -version
# javac 1.8.0_20
How do I downgrade the Java compiler?
Open a console. Type
sudo update-alternatives --config javac
After entering your root password you can enter the number of a javac with "java-7" in its name.
Edit: You could also update-alternatives --config java
to choose a newer JVM that is compatible to Java 8 bytecode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With