我的电脑和lnux服务器JDK JRE 版本都一样,都是1.7.0——71,为什么本地运行正常而在服务上报版本错误?
message boilerWeChat/servlet/WxServlet : Unsupported major.minor version 52.0 (unable to load class boilerWeChat.servlet.WxServlet) description The server encountered an internal error that prevented it from fulfilling this request. exception java.lang.UnsupportedClassVersionError: boilerWeChat/servlet/WxServlet : Unsupported major.minor version 52.0 (unable to load class boilerWeChat.servlet.WxServlet) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2961) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(Unknown Source) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.57 logs.
LINUX:
我的电脑:
52 是 java8
可能你环境变量是7,但是ide里实际用的是8
建议可以考虑
maven
orgradle
之类的项目构建工具你配置的是JDK里面的JRE吗?有两个JRE