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或是好压)打开它。
②依次找到并双击打开org\apache\catalina\util\ServerInfo.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

Linux改法我没有实践,不过我是参照Linux的改法在Windows上操作的,所以应该不会错!
其他版本要是也报这样的错,改法是一样的!
参考地址:

http://stackoverflow.com/a/37614406/6952713

你可能感兴趣的:(eclipse,Java,tomcat,tomcat,eclipse)