记录一下在windows环境下通过命令行窗口进行进程有关的几个操作。
1、查找占用端口的进程ID(PID):
netstat -ano|findstr 28087
假如PID为2181
2、根据PID找进程名称:
tasklist | findstr 2181
发现是占用28087端口的进程为:java.exe。
3、根据PID结束对应进程:
taskkill -PID 2181 -F
强制关闭PID为2181的进程。
记录一下在windows环境下通过命令行窗口进行进程有关的几个操作。
netstat -ano|findstr 28087
假如PID为2181
tasklist | findstr 2181
发现是占用28087端口的进程为:java.exe。
taskkill -PID 2181 -F
强制关闭PID为2181的进程。