mardi 14 juin 2016

Unsupported major.minor version 52.0 in Java + Eclipse + Linux [Solution]

The "unsupported major.minor version 52.0" error started to come after Java SE 8 release and the root cause of this error is trying to run a Java application compiled with JDK 8 into a JRE lower than Java SE 8 e.g. JRE 7 or JRE 6. This is very common because a developer has updated their compiler or IDE to Java SE 8 but many times their runtime is not upgraded to Java 8. If you remember, in Java you can run a class file compiled with a lower version say Java 6 to a higher version say JRE 8 because Java is backward compatible but vice-versa is not allowed. This make sense because Java SE 8 has features like lambda expressions, method reference, functional interface and new Date and Time API, which lower version JRE has no information. Depending upon where you getting this error e.g. Eclipse, NetBeans, IntelliJ IDEA or Android Studio, the solution could be different. All these IDEs has different settings for JRE but the bottom line is same, you need to configure these IDE to use JRE 8 to run the Java program compiled using Java 8.
Read more »
Share:

0 commentaires:

Enregistrer un commentaire