首先我登录的是tomcat官网,选择source包下载,wget http://apache.fayea.com/tomcat/tomcat-9/v9.0.0.M26/src/apache-tomcat-9.0.0.M26-src.tar.gz

tar -xf  apache-tomcat-9.0.0.M26-src.tar.gz

mv  apache-tomcat-9.0.0.M26-src /mnt/tomcat

cd /mnt/tomcat/bin

执行./startup.sh

结果显示,启动正常

Using CATALINA_BASE: /mnt/tomcat
Using CATALINA_HOME: /mnt/tomcat
Using CATALINA_TMPDIR: /mnt/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.8.0_77
Using CLASSPATH: /mnt/tomcat/bin/bootstrap.jar:/mnt/tomcat/bin/tomcat-juli.jar
Tomcat started.

但是用netstat -lntp|grep 8080会发现tomcat根本没有启动,查看 /mnt/tomcat/logs/catalina.out,报错:

Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

我觉得非常奇怪,首先检查/mnt/tomcat/bin/bootstrap.jar确实不存在,然后 用find / -name bootstrap.jar在本地也找不到。那到底哪里导致的呢?

 

后面看了网上的帖子的才知道,原来tomcat官网中的source包是不完整的,logs文件夹跟bootstrap.jar一些重要的文件都没有的。正确的tomcat应该下载它的bin包

Tomcat9 Error: Could not find or load main class org.apache.catalina.startup.Bootstrap

特意把它写下来,省得大家浪费时间去检查日志什么的!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-01-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-21
  • 2021-09-20
  • 2021-11-03
  • 2021-08-19
  • 2021-10-07
  • 2022-12-23
相关资源
相似解决方案