一直使用Mac做开发,偶然一次启动Mac中eclipse中的tomcat时报错:123456Several 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).
在网上查找资料大多是Windows上解决的办法!
现在说一说Mac下的解决的办法:
打开终端,确定被占用的端口号,输入以下命令:
1lsof -i :8080该命令会输出下图所示内容:

我的电脑上被占用8080端口的进程ID是698,所以干掉这个进程就OK了
1kill -9 698根据你的进程ID更改最后的一个参数,在终端输入后回车,然后重启Eclipse,tomcat可以正常启动了!