Tomcat 8不支持major.minor版本52.0(无法加载类(Tomcat 8 Unsupported major.minor version 52.0 (unable to load cla

编程入门 行业动态 更新时间:2024-10-08 08:29:26
Tomcat 8不支持major.minor版本52.0(无法加载类(Tomcat 8 Unsupported major.minor version 52.0 (unable to load class)

我知道这可能被视为重复,但其他答案都不适用于我。

我正在将一个WAR文件部署到ubuntu 14.04。 无论我用(1.6,1.7,1.8)编译的版本,我都会继续得到这个错误。 我的tomcat版本

ubuntu@HOST:/opt/tomcat/bin$ ./version.sh Using CATALINA_BASE: /opt/tomcat Using CATALINA_HOME: /opt/tomcat Using CATALINA_TMPDIR: /opt/tomcat/temp Using JRE_HOME: /usr/lib/jvm/java-8-oracle Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar Server version: Apache Tomcat/8.0.23 Server built: May 19 2015 14:58:38 UTC Server number: 8.0.23.0 OS Name: Linux OS Version: 3.11.0-15-generic Architecture: amd64 JVM Version: 1.8.0_111-b14 JVM Vendor: Oracle Corporation

请注意它是1.8.0,但网络管理员说这个

这毫无意义。 请注意,tomcat7当前已安装但未运行。

附加信息:

ubuntu@HOST:/opt/tomcat/bin$ java -version java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

I understand this may be considered a duplicate but none of the other answers worked for me.

I'm deploying a WAR file to ubuntu 14.04. No matter the version I compile with (1.6,1.7,1.8) I continue to get this error. My tomcat versions

ubuntu@HOST:/opt/tomcat/bin$ ./version.sh Using CATALINA_BASE: /opt/tomcat Using CATALINA_HOME: /opt/tomcat Using CATALINA_TMPDIR: /opt/tomcat/temp Using JRE_HOME: /usr/lib/jvm/java-8-oracle Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar Server version: Apache Tomcat/8.0.23 Server built: May 19 2015 14:58:38 UTC Server number: 8.0.23.0 OS Name: Linux OS Version: 3.11.0-15-generic Architecture: amd64 JVM Version: 1.8.0_111-b14 JVM Vendor: Oracle Corporation

note that it's 1.8.0 but the web mananger says this

which makes no sense. Note that tomcat7 is currently installed but not running.

Additional Info:

ubuntu@HOST:/opt/tomcat/bin$ java -version java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

最满意答案

很明显,您正在运行带有1.7 JVM的tomcat(请参阅管理器输出)。 仔细检查你启动tomcat的方式。 你在某个地方在启动脚本中设置JAVA_HOME吗?

这取决于操作系统版本以及安装tomcat的方式,以便在何处查找配置设置。 对于Ubuntu 16.04上的标准安装,tomcat 7设置位于/etc/default/tomcat7 。

It is clear that you are running tomcat with a 1.7 JVM (see managers output). Double check the way you start tomcat. Do you somewhere set JAVA_HOME in the startup script?

It depends on the OS version and the way tomcat is installed where to find the configuration settings. For a standard install on Ubuntu 16.04 the tomcat 7 settings are found in /etc/default/tomcat7.

更多推荐

本文发布于:2023-08-07 11:22:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464046.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不支持   加载   版本   minor   major

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!