0

Possible Duplicate:
Exception in thread “main” java.lang.UnsupportedClassVersionError: a (Unsupporte d major.minor version 51.0)

I have been using Eclipse with jre 1.7.x and jdk 1.7.x before and I had to downgrade to 1.6x.

The way that I downgraded was to uninstall all the 1.7 related from my computer and install 1.6 again.

Now, when I try to debug, I am getting

`java.lang.UnsupportedClassVersionError: MyClass: Unsupported major.minor version 51.0`

I checked the version of JRE and JDK that used to compiled, both of them are 1.6.

Can anyone help with this?

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
Tony
  • 3,319
  • 12
  • 56
  • 71

2 Answers2

2
java.lang.UnsupportedClassVersionError: `Unsupported major.minor version 51.0`

Your runtime version is different from compile time version.

Make sure JAVA_HOME variables etc., to make sure compile and runtime both pointing to same version.

kosa
  • 65,990
  • 13
  • 130
  • 167
0

take a look here How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version

you compiled code with 1.7 and debugging with 1.6

Community
  • 1
  • 1
Andrey Borisov
  • 3,160
  • 18
  • 18