@echo off
chcp 65001
echo "启动界面"
echo "停止之前运行中的软件。。。。"
set port=8080for/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
):start
echo "停止之前运行中的软件完成"
echo "开始重新启动凌钢4#棒材厂天车定位系统。。。"
START "app" javaw -jar bunker-web-1.0.jar
echo "系统已在后台启动,按任意键退出此界面!!"
pause & exit
关闭jar包程序
@echo off
chcp 65001
echo "停止凌钢4#棒材厂天车定位系统。。。。"
set port=8080for/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
):start
echo "系统已停止,按任意键退出此界面!!"
pause & exit