When you update your GAE version to the latest, you might have been struck in the following error.
java.lang.UnsupportedClassVersionError: com/google/appengine/tools/enhancer/Enhance : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Reason for this is that the JDK versions and JRE versions you use are conflict with either each other or the version compatible with the latest GAE SDK version.
First thing I did is check for Java versions installed in my machine. I found out that I have java 1.6 and 1.7 both installed. So I change the default JDK to 1.7 (since newer GAE tends to be more support for java 7).
Change your JDK_HOME, JRE_HOME and PATH variables to reflect the location of newest JDK in your machine.
Though this solve the above error, it might introduce a new error which is eclipse is not able to recognize the appengine-sdk at all.
“Failed to initialize App Engine SDK at [path]”
The reason might be that when eclipse launch it do not use the default Java runtime. To force eclipse to use the default runtime, add the “-vm” argument to <eclipse-folder>\eclipse.ini file.
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
—launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835
-vm
C:\Program Files\Java\jdk1.7.0_45\bin\javaw.exe
No comments:
Post a Comment