1查询端口占用
C:\Windows\system32>netstat -ano | findstr "8888"
TCP 0.0.0.0:8888 0.0.0.0:0 LISTENING 6796
TCP [::]:8888 [::]:0 LISTENING 6796
2查询进程pid
C:\Windows\system32>tasklist | findstr "6796"
javaw.exe 6796 Console 1 951,768 K
3杀死进程
C:\Windows\system32>taskkill /T /F /PID 6796
成功: 已终止 PID 6796 (属于 PID 9428 子进程)的进程。