windows cmd命令:
1 查找端口占用的进程 netstat -aon|findstr "端口号" 例如:netstat -aon|findstr "7777";
返回 TCP 0.0.0.0:7777 0.0.0.0:0 LISTENING 1996
1996就是进程号
2 查找进程开启的应用 tasklist|findstr "进程号" 例如:tasklist|findstr "1996"
返回 javaw.exe 1996 Console 0 83,752 K
javaw.exe即端口占用程序