一 . 异常来源:启动Tomcat服务器报错:
Several ports (8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
二 . 异常分析:
端口 8080, 8009被占用了。可能是在打开Tomcat的情况下关闭了Eclipse,或是Eclipse非正常关闭,导致先前的Tomcat没有被关闭,端口占用。或是其他软件占用了tomcat的端口号。
三 . 解决方案:
- 打开任务管理器
- 找到java虚拟机相关的进程javaw.exe,将它结束掉。(选项“详细信息”中有javaw.exe)
- 重新启动即可。
- 如果没有这个进程,那可能是其他软件占用了端口。