How to view the ports that a program occupies
First, see the ports that all processes occupy
At start-run-cmd, enter: Netstat–ano can view all processes
Second, view the program that occupies the specified port
When you are using Tomcat to publish a program, often encounter the situation that the port is occupied, we want to know which program or process occupies the port, you can use this command netstat–ano|findstr "specify port number" Two, view the program that occupies the specified port when you are using Tomcat to release the program, Often encounter the situation of the port is occupied, we want to know which program or process occupies the port, you can use this command netstat–ano|findstr "specify port number" Two, view the program that occupies the specified port
When you are using Tomcat to publish a program, often encounter the situation that the port is occupied, we want to know which program or process occupies the port, can use this command netstat–ano|findstr "specify port number"
Such as: Query takes up 8080 ports of process: Netstat-ano|findstr "8080"
Kill related processes through Task Manager
Method One: Use Task Manager to kill a process
Open Task Manager-> view-> Select column-> then check the PID option, return to the task Manager to see the corresponding PID, and then end the process
Of course, the above methods sometimes difficult to use, is the task manager in the process of more time, and then to find the corresponding process is very troublesome, so there is a way to kill the process of
Method Two: Kill process with Command
1> first find the process name corresponding to the process number
TASKLIST|FINDSTR Process Number
such as: Tasklist|findstr 3112
2> then kills the process according to the process name
taskkill/f/t/im Process Name
such as: taskkill/f/t/im/javaw.exe