當你打開eclipse準備添加tomcat時,發現沒有apache tomcat的選項,界面是這樣的。
【Eclipse】【tomcat】 添加Apache tomcat 并解決A Tomcat 8.0 installation is expected.錯誤Eclipse添加tomcat出現 The Apache Tomcat installation at this directory is version 8.5.6. A Tomcat 8.0 installation is expected. 但是我們需要tomcat怎麼辦?
第一步
【Eclipse】【tomcat】 添加Apache tomcat 并解決A Tomcat 8.0 installation is expected.錯誤Eclipse添加tomcat出現 The Apache Tomcat installation at this directory is version 8.5.6. A Tomcat 8.0 installation is expected. 第二步,編輯框搜尋JST找到第一個,包含apache tomcat的工具集,安裝
【Eclipse】【tomcat】 添加Apache tomcat 并解決A Tomcat 8.0 installation is expected.錯誤Eclipse添加tomcat出現 The Apache Tomcat installation at this directory is version 8.5.6. A Tomcat 8.0 installation is expected. 第三步,重新開機eclipse,重新檢視eclipse中window--conf.....--搜尋server,就能顯示apache tomcat.
【Eclipse】【tomcat】 添加Apache tomcat 并解決A Tomcat 8.0 installation is expected.錯誤Eclipse添加tomcat出現 The Apache Tomcat installation at this directory is version 8.5.6. A Tomcat 8.0 installation is expected. 第五步,當你準備添加tomcat時,有可能會報這個錯誤。
Eclipse添加tomcat出現 The Apache Tomcat installation at this directory is version 8.5.6. A Tomcat 8.0 installation is expected. 解決辦法:
打開tomcat安裝目錄:apache-tomcat-8.5.6\lib 找到catalina.jar
用解壓縮工具打開 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
server.info=Apache Tomcat/8.0.8.5.6
server.number=8.5.6.0
server.built=Oct 6 2016 20:15:31 UTC
再次添加後,不再報錯。
然後重新添加tomcat,完成!