The Apache Tomcat installation at this directory is version 8.5.6A Tomcat 8.0 installation is expect

在eclipse中安装tomcat8.5时,报错:

The Apache Tomcat installation at this directory is version 8.5.6. A Tomcat 8.0 installation is expected.

解决办法:
Windows中

①在Tomcat的安装目录中找到lib目录,再找到catalina.jar。使用压缩软件(WinRAR或是好压)打开它。
②依次找到并双击打开orgapachecatalinautilServerInfo.properties 文件

server.info=Apache Tomcat/8.5.6
server.number=8.5.6.0
server.built=Oct 6 2016 20:15:31 UTC

改为:

#Apache Tomcat/8.5.6
server.info=Apache Tomcat/8.0.0
#8.5.6.0
server.number=8.0.0
server.built=Oct 6 2016 20:15:31 UTC

在Linux中改法:

cd [tomcat or tomee home(tomcat目录)]/lib
mkdir catalina
cd catalina/
unzip ../catalina.jar
vim org/apache/catalina/util/ServerInfo.properties

`把版本号改成如下形式:`

server.info=Apache Tomcat/8.0.0
server.number=8.0.0
server.built=May 11 2016 21:49:07 UTC

接着把改好的ServerInfo.properties文件添加到catalina.jar中:

jar uf ../catalina.jar org/apache/catalina/util/ServerInfo.properties
cd ..
rm -rf catalina

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注