Trying to use java 1.6 with app engine gives runtime errors

I'm using google app engine java 1.3.4. In eclipse, I set the java compiler to use java 1.6. I don't get any compile errors, but as soon as I try Run As -> Web App I get the following:

WARNING: failed forwardFilter: java.lang.UnsupportedClassVersionError: Bad version number in .class file

WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@94b146{/,/Users/me/Desktop/projects/myproject/myproject/eclipse/myproject/war}: java.lang.UnsupportedClassVersionError: Bad version number in .class file

WARNING: failed JettyContainerService$ApiProxyHandler@64f8d4: java.lang.UnsupportedClassVersionError: Bad version number in .class file

WARNING: Error starting handlers java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:676) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:317) at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.mortbay.util.Loader.loadClass(Loader.java:91) at org.mortbay.util.Loader.loadClass(Loader.java:71) at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73) at org.mor tbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:81) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.appengine.tools.development.JettyC ontainerService.startContainer(JettyContainerService.java:185) at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:146) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:222) at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:171) at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.(DevAppServerMain.java:120) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:96)

INFO: The server is running at http://localhost:8888/

anyone else getting this? I'm downloading 1.3.5 now but not sure if that's the problem. I'm on a mac 10.5.4

Thank you


如果您使用的是Mac,则需要使用Java 1.5才能使应用程序引擎代码正确编译和运行。


You can check which version is required by going into project's properties and then into Project Facets. See this: 在这里输入图像描述

链接地址: http://www.djcxy.com/p/63568.html

上一篇: Base64DecoderException错误谷歌应用程序引擎

下一篇: 试图在应用程序引擎中使用java 1.6会导致运行时错误