Reputation: 3016
I have Google App Engine project that I have been working on. Everything was fine until I did an update of my jdk7. Now when I deploy my app I am getting servlet java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0 exception. Did some research that said this exception is cause by byte code compiled by a newer jdk running a older jvm. So I looked for the oldest version of the jdk I could find jdk6u36 and deployed my project using that and still have the project (Did some other embarassing stuff to see what exactly was causing the problem like remove all of my class file a test them one by one and get the same problem with all of them). Please I really need help to solve this problem.
Upvotes: 1
Views: 2432
Reputation: 3016
Has you guys stated I am compiling on newer JDK and deploying on an Older JRE. So to solve the problem I changed the compiler for my project to jdk 6, by right clicking on the project->properties->java compiler. I also changed the JAVA_HOME environment variable to point to the location of the JDK6 and that solved my problem. Thanks alot
Upvotes: 0
Reputation: 719249
Did some research that said this exception is cause by byte code compiled by a newer jdk running a older jvm.
That is right ...
So I looked for the oldest version of the jdk I could find jdk6u36 and deployed my project using that and still have the project ...
Well obviously that won't work! You are compiling on a newer JDK and deploying on an older JDK / JRE. You need to compile on the older JDK. That is what your research just told you ...
Upvotes: 1