注:48,49是Java编译器内部的版本号,48表示是用JDK1.4来编译运行程序的,49表示是用JDK1.5编译运行程序的
详细报错如下:
java.lang.UnsupportedClassVersionError: org/apache/jsp/house/out/new_005frent_005fout_jsp (Unsupported major.minor version 49.0)
java.lang.ClassLoader.defineClass0(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:537)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
java.net.URLClassLoader.access$100(URLClassLoader.java:55)
java.net.URLClassLoader$1.run(URLClassLoader.java:194)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:187)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:192)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:110)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:583)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:177)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1002)
org.apache.jsp.index_jsp._jspService(index_jsp.java:111)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
net.seave.systemManage.pub.EncodeFilter.doFilter(EncodeFilter.java:77)
解决方案:
把jdk切换到1.4然后再编译生成新的class,同时设置好,JAVA_HOME,path,classpath等项,然后再重启服务,运行,okay,问题解决.
另:
在网上找了点资料,
JDK5.0,要求Tomcat版本必须不能低于5.5*。问题是如果我需要用低于5.5*版本的Tomcat怎么办呢?
答案就是:将JDK5.0的lib目录下的tools.jar覆盖 TOMCAT安装目录/common/lib下面的tools.jar,然后重启TOMCAT5.0就可以了
posted on 2006-08-04 10:15
小言身寸 阅读(863)
评论(0) 编辑 收藏 所属分类:
应用服务器