window :终端
netstat -aon|findstr 1099 找出占用1099端口的进程
taskkill -f -pid 111(进程号)
mac:终端
Mac -mini:bin zlinsun$ sudo lsof -i :1099
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 1527 zlinsun 31u IPv6 0xbd669f146eb5df4f 0t0 TCP *:rmiregistry (LISTEN)
Mac-mini:bin zlinsun$ sudo kill -9 1527
Mac-mini:bin zlinsun$