@echo off
set port=8808
set port2=8880
for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%port%"') do (
echo kill the process %%m who use the port
taskkill /pid %%m -t -f
goto start
)
for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%port2%"') do (
echo kill the process %%m who use the port2
taskkill /pid %%m -t -f
goto start
)
ping 127.0.0.1 -n 5
start java -jar blct-1.0.jar
exit
:start
ping 127.0.0.1 -n 5
start java -jar blct-1.0.jar
exit
版权归属:
高大北
许可协议:
本文使用《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》协议授权
评论区