java.lang.UnsupportedClassVersionError: Bad version number in .class file出错
typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatprevent...
type Exception report
message
description The server encountered an internal error () that
prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(Unknown Source)
java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
com.sjh.algorithm.SimpleSummariserAlgorithmMain.segStr(SimpleSummariserAlgorithmMain.java:185)
com.sjh.algorithm.SimpleSummariserAlgorithmMain.summarise(SimpleSummariserAlgorithmMain.java:45)
com.digest.servlet.DigistServlet.doGet(DigistServlet.java:69)
com.digest.servlet.DigistServlet.doPost(DigistServlet.java:134)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the
Apache Tomcat/5.0.28 logs. 展开
message
description The server encountered an internal error () that
prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.UnsupportedClassVersionError: Bad version number in .class file
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(Unknown Source)
java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
com.sjh.algorithm.SimpleSummariserAlgorithmMain.segStr(SimpleSummariserAlgorithmMain.java:185)
com.sjh.algorithm.SimpleSummariserAlgorithmMain.summarise(SimpleSummariserAlgorithmMain.java:45)
com.digest.servlet.DigistServlet.doGet(DigistServlet.java:69)
com.digest.servlet.DigistServlet.doPost(DigistServlet.java:134)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the
Apache Tomcat/5.0.28 logs. 展开
2个回答
推荐于2016-04-05
展开全部
java.lang.UnsupportedClassVersionError: Bad version number in .class file
造成这种过错是ni的支撑Tomcat运行的JDK版本与支撑application运行的JDK版本不一致导致的.
把它们的JDK版本改成一致步骤如下:
1.Window --> Preferences -->Java --> compiler中的compiler compliance level对应的下拉菜单中选择JDK版本.
2.Window --> Preferences -->MyEclipse --> Servers -->Tomcat --> Tomcat n.x -->JDK中的Tomcat JDK name下的下拉菜单中选择自身电脑上安装的JDK版本(必需与步骤1中的JDK版本一致).
你试试看 我刚刚遇到这类问题,就是这样解决的。
造成这种过错是ni的支撑Tomcat运行的JDK版本与支撑application运行的JDK版本不一致导致的.
把它们的JDK版本改成一致步骤如下:
1.Window --> Preferences -->Java --> compiler中的compiler compliance level对应的下拉菜单中选择JDK版本.
2.Window --> Preferences -->MyEclipse --> Servers -->Tomcat --> Tomcat n.x -->JDK中的Tomcat JDK name下的下拉菜单中选择自身电脑上安装的JDK版本(必需与步骤1中的JDK版本一致).
你试试看 我刚刚遇到这类问题,就是这样解决的。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询