Reputation: 1783
Initially my code was build/compiled using open-jdk7.
But due to some constraints I now have to use open-jdk6 only. So, when I tried compiling my code using jdk6 I got the following error:
Exception in thread "main" java.lang.UnsupportedClassVersionError:
javaapplication1/JavaApplication1 : Unsupported major.minor version 51.0
OS used: ubuntu 11.10
Any help would be appreciated.
Upvotes: 1
Views: 663
Reputation: 360
This could be a result of depending on some other classes (libraries/jars) that is compiled on different version of JDK (1.7 in this case).
Make sure that you use the 1.6 compiled version of the jars/libraries.
Upvotes: 2
Reputation: 310
Do you still have the code? Could you recompile the raw code with JDK-6?
Upvotes: 0