1.java-home配置
如果没有配置java_home环境变懒,在双击"starup.bat"文件运行tomcat时,将一闪立即关闭。且必须配置正确,及java_home指向jdk的安装目录
1.2端口号冲突
当同一台计算机启动两个tomcat时,第二个tomcat将会在控制台抛出异常,摘要信息如下:
严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"]
java.net.BindException: Address already in use: JVM_Bind <null>:8080
...
Caused by: java.net.BindException: Address already in use: JVM_Bind
...
控制台将出现大量异常信息,描述的是3个端口被占用(8080,8009,8005)
通过$java_home/conf/server.xml修改端口号