java.lang.UnsupportedClassVersionError:com/google/mystorage/server/GreetingServiceImpl:Unsupported major.minor 51.0版

java.lang.UnsupportedClassVersionError:com/google/mystorage/server/GreetingServiceImpl:Unsupported major.minor 51.0版,java,google-app-engine,jsp,Java,Google App Engine,Jsp,我不熟悉JAVA和AppEngine。我已经安装了JDK-1.6,但仍然会发生异常。项目文件部署在服务器上时没有任何错误,但当打开链接时,它会给出一个错误。在我的应用程序日志中,它只显示一个不支持ClassVersionError的异常。我已经安装了JDK-1.6,但它不工作。我还安装了JDK-1.5,但在部署阶段,它给出了所有排列未编译错误。下面是我的项目XML文件 XML文件是 web.xml appengine-web.xml datastore-index.xml 请帮助我您为J

我不熟悉JAVA和AppEngine。我已经安装了JDK-1.6,但仍然会发生异常。项目文件部署在服务器上时没有任何错误,但当打开链接时,它会给出一个错误。在我的应用程序日志中,它只显示一个不支持ClassVersionError的异常。我已经安装了JDK-1.6,但它不工作。我还安装了JDK-1.5,但在部署阶段,它给出了所有排列未编译错误。下面是我的项目XML文件

XML文件是 web.xml

appengine-web.xml

datastore-index.xml


请帮助我

您为Java 7编译了Java 6无法理解的代码


使用Java 6 Java C重新编译。

您已经为Java 7编译了Java 6无法理解的代码


用Java6JavaC重新编译。

我在共享项目中也遇到了同样的问题。尝试删除war/WEB-INF/classes目录下所有编译过的类,这些类看起来像是源代码的编译版本。

我在共享项目中也遇到了同样的问题。尝试删除所有已编译的类war/WEB-INF/classes目录下与源代码的编译版本相似的所有内容。

您不是已经问过这个问题了吗:@RichW-Um,不,他没有。阅读这些问题。仅仅因为同一个人发布了2我对java简介不熟悉并不意味着他们是同一个问题。我不知道,谷歌对我的项目做了什么。厌倦了这个例外你不是已经问过这个了吗:@RichW嗯,不,他没有。阅读这些问题。仅仅因为同一个人发布了2我对java简介不熟悉并不意味着他们是同一个问题。我不知道,谷歌对我的项目做了什么。厌倦了这个例外,或者使用-target 1.6重新编译并确保不使用任何Java 7特性,或者使用-target 1.6重新编译并确保不使用任何Java 7特性。
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
              http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5"
         xmlns="http://java.sun.com/xml/ns/javaee">

  <!-- Servlets -->
  <servlet>
    <servlet-name>greetServlet</servlet-name>
    <servlet-class>com.google.mystorage.server.GreetingServiceImpl</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>greetServlet</servlet-name>
    <url-pattern>/mystorage/greet</url-pattern>
  </servlet-mapping>

  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

</web-app>
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <application>cloudisapp</application>
  <version>2</version>

  <!--
    By default, App Engine sends requests serially to a given web server.
    To allow App Engine to send multiple requests in parallel specify:

      <threadsafe>true</threadsafe>
  -->

  <!-- Configure serving/caching of GWT files -->
  <static-files>
    <include path="**" />
    <include path="favicon.ico"/>
    <!-- The following line requires App Engine 1.3.2 SDK -->
    <include path="**.nocache.*" expiration="0s" />

    <include path="**.cache.*" expiration="365d" />
    <exclude path="**.gwt.rpc" />
  </static-files>

  <!-- Configure java.util.logging -->
  <system-properties>
    <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
  </system-properties>
  <sessions-enabled>true</sessions-enabled>
</appengine-web-app>
<?xml version="1.0" encoding="UTF-8"?>
<datastore-indexes  autoGenerate="true">
</datastore-indexes>