Can't fix Unsupported major.minor version 52.0 even after fixing compatibility

I agree with chrylis: you believe you changed your project's compliance settings but probably you didnt.

Right click on your project and:

  • Java / Build Path : Go to Libraries tab and ensure yourself that you are really using jre6
  • Java / Compiler : Ensure yourself that you have selected 1.6 compliance

By the way you can "tell" eclipse that jre8 is 1.6 compliance clicking on Window/Preferences/Java/Installed JREs/Execution Environment and selecting in the left panel, Execution Environments, JavaSE-1.6 and in the Compatible JRE's panel, jre8


Hi I found this link that helped me understand the issue. Hope it is useful. Version released so far are

  • Java SE 8 = 52,
  • Java SE 7 = 51,
  • Java SE 6.0 = 50,
  • Java SE 5.0 = 49,
  • JDK 1.4 = 48,
  • JDK 1.3 = 47,
  • JDK 1.2 = 46,
  • JDK 1.1 = 45

and from thata data it simply means

Many people think why do you get a version mismatch error if Java is backward compatible. Well, its true that Java is backward compatible, which means you can run a Java class file or Java binary (JAR file) compiled in lower version (java 6) into higher version e.g. Java 8, but it doesn't mean that you can run a class compiled using Java 7 into Java 5, Why? because higher version usually have features which are not supported by lower version.

Sometimes you may have more than one version of Java installed in you machine. Make sure the application you are running is pointing to the right or highest version available.


I Encounter similar issue while doing development on Android Studio 2.2.

My Machine Configuration -

  1. JDK version 1.7.0_79 installed
  2. JDK version 1.8.0_101 installed
  3. Environment variable contains : JAVA_HOME = 1.7.0_79 JDK path and same is added to path variable
  4. Project SDK Location = C:\Program Files\Java\jdk1.8.0_101

I then made below changes - 1. Uninstall JDK 1.7.0_79 2. Updated JAVA_HOME = 1.8.0_101 JDK path (Similar to SDK Location)

Now i am able to compile and run my application successfully , no more Unsupported major.minor version 52.0 Error

Tags:

Java

Eclipse