One, view the ports that are occupied by all processes
At the start-run-cmd, enter: Netstat–ano to view all processes
Second, view the program that occupies the specified port
When you are using Tomcat to publish a program, you often encounter the port is occupied, we want to know which program or process occupies the port, you can use the command netstat–ano|findstr "specify port number" two, to see the program that occupies the specified ports when you are using Tomcat to publish the program, Often encounter the port is occupied, we want to know which program or process occupies the port, you can use the command netstat–ano|findstr "specify port number" two, to see the application of the designated ports
When you are using Tomcat to publish a program, you often encounter the port is occupied, we want to know which program or process occupies the port, you can use the command netstat–ano|findstr "specify port number"
For example: query consumes 8080 port process: netstat-ano|findstr "8080"
Third, kill the related process through the Task Manager
Method One: Use Task Manager to kill a process
Open Task Manager, view, select columns, and then check the PID option, go back to Task Manager to view the corresponding PID, and then end the process
Of course, the above method is sometimes bad, that 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 the process with a command
1> first find the process name corresponding to the process number
TASKLIST|FINDSTR Process Number
Example: Tasklist|findstr 3112
2> then kills the process based on the process name
taskkill/f/t/im Process Name
such as: taskkill/f/t/im/javaw.exe