Tomcat installation at this directory is version 9.0.0.M26. A Tomcat 8.0 installation is expect

tomcate:apache-tomcat-9.0.0.M26

eclipse:Version: Luna Service Release 2 (4.4.2)

背景:

在eclipse中添加 server -> Runtime Environment -> Add -> Apache Tomcate v8.0 -> Next -> Tomcate installation diretory -> Browse -> apache-tomcat-9.0.0.M26

-> The Apache Tomcat installation at this directory is version 9.0.0.M26.  A Tomcat 8.0 installation is expected.


解决方法:进入 tomcate的安装目录里,E:\Develop software\apache-tomcat-9.0.0.M26\lib,解压 catalina.jar , 进入 \org\apache\catalina\util\,编辑 ServerInfo.properties


server.info=Apache Tomcat/9.0.0.M26
server.number=9.0.0.0
server.built=Aug 2 2017 20:29:05 UTC

改为

server.info=Apache Tomcat/8.0.0
server.number=8.0.0
#server.info=Apache Tomcat/9.0.0.M26
#server.number=9.0.0.0
server.built=Aug 2 2017 20:29:05 UTC

即可。

注意:如果直接改不生效,可以在cmd窗口中解压 catalina.jar ,修改ServerInfo.properties,压缩成新的catalina.jar,替换原来的catalina.jar即可。

附上命令:

解压:jar xvf catalina.jar

压缩:jar cvf catalina.jar ./*


有问题可联系邮箱:[email protected]




你可能感兴趣的:(java)