Skip to content
Advertisement

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

When I try running my java .jar on another machine I get the error

Unsupported major.minor version 52.0

I compiled my program using the jdk 1.6 and my machine (separate one) has java 7 installed.

This is the java version my machine is running:

java version 1.7

Here are the settings in my IDE (Eclipse Lunar)

eclipse compiler settings

eclipse JRE settings

Why am I still getting an unsupported error?

I did check my run configuration and change it to jre6, but when I do I can’t even run my program in the IDE.

Note: I would like my program to work with jdk 6, if that is not possible jdk 7.

My Class Path:

class path

Advertisement

Answer

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

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement