写程序经常遇到端口被占用的问题,用以下命令解决。

解决方法

C:\Users\Sh4wnZec>netstat -aon | findstr "8082"
  TCP    0.0.0.0:8082           0.0.0.0:0              LISTENING       8964

C:\Users\Sh4wnZec>tasklist | findstr "8964"
QQ.exe                        8964 Console                    1    240,376 K