今天開發,tomcat死機了,重啓eclipse之後,發現:
Several ports (8080, 8009) required by Tomcat v6.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中結束Tomcat的進程,還不用重啓電腦。
-
1、在dos下,輸入 netstat -ano|findstr 8080
//說明:查看佔用8080端口的進程
顯示佔用端口的進程
-
2、taskkill /pid 6856 /f
//說明,運行windows自帶taskkill命令,將上面顯示的進程號,結束掉。
下面有圖爲證
這樣,大家以後再遇見Tomcat端口號被佔用的問題,就不用再重啓電腦了。