myEclipse的tomcat端口被占用问题的一种解决方法

在用MyEclipse做Web项目,以tomcat运行时报错:

myEclipse的tomcat端口被占用问题的一种解决方法

写着:

'Launching Tomcat v8.0 Server at localhost' has encountered a problem.

Serval ports(8080,8009) required by Tomcat v8.0 Server at localhost are already in use. The server may already be running in another process, or a sytem process may be using the port. To star thsi server you will need to stop the other process or change the port number(s).


大概就是说8080端口被占用了,但是我的其它程序并没有用到8080端口呀,于是打开Tomcat的bin目录下的shutdown.bat(linux系统的话是打开shutdown.sh)程序,运行后tomcat会被停止,此时再重新启动Tomcat,神奇地发现,可以运行web项目了。

myEclipse的tomcat端口被占用问题的一种解决方法

博主小白一杖,只是提出一个比较傻瓜的方法,原理也不知道,不过它确实是可行的。如果有大神发现其原理或者更好的方法,欢迎提出来。