In development, it is unavoidable that Windows ports are occupied, so let's look at the port occupancy and end of the process that occupies the port.
Win+r input cmd into the command prompt;
For example, we want to see the occupancy of port 8080, enter Netstat-aon | findstr "8080", note: note the space;
" 8080 "
Proto Local Address Foreign address State PID
==== ============ ============== ========== ======
TCP 0.0. 0.0:8080 0.0. 0.0:0 LISTENING 9948 TCP [::]:8080 [:: ]:0 LISTENING 9948
You can see that the current 8080 port is occupied by the process number (PID) 9948 program, Input tasklist | Findstr "9948" to see the process number is 9948 of the program occupancy;
" 12012 "
Image name PID session name Session # Memory usage
========================= ====== ====== ======== ========
Javaw.exe 9948 Console 1 329,652 K
It can now be seen that the process number of the Javaw.exe is 9948, input taskkill/pid 9948/f, to end process number 9948 process;
9948 /9948 process.
If you are familiar with this process and are sure that it can be terminated, then use the Taskkill/pid 9948/f command to terminate the PID 9948 process directly. (This step can also be done in Task Manager, right-click the taskbar, select Task Manager Javaw.exe is the image name in the Task Manager, select it, click "End Process")
Full command:
Windows view port occupancy, end process