1: First find the port process
Take the port number 1099
as an example here.
C:\Users\Administrator>netstat -ano | findstr "1099"
TCP 0.0.0.0:1099 0.0.0.0:0 LISTENING 17412
TCP [::]:1099 [::]:0 LISTENING 17412
You can see that the process number occupied is 17412
.
2: Kill the process
Here kill the process number found in the first step 17412
.
C:\Users\Administrator>taskkill -PID 17412 -F
成功: 已终止 PID 为 17412 的进程。