Priyank Kapasi
Priyank Kapasi

Reputation: 1783

java compile time error, due to downgrade from jdk7 to jdk6

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

Answers (2)

Ahmed Hashem
Ahmed Hashem

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

Kinz
Kinz

Reputation: 310

Do you still have the code? Could you recompile the raw code with JDK-6?

Upvotes: 0

Related Questions