win启动脚本
@echo off set port=12367 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 ) :start START "app" javaw -jar identify-standalone.jar
重启
@echo off set port=12367 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 q ) :q
停止
@echo off START "app" javaw -jar identify-standalone.jar
开始
本文来自博客园,作者:余生请多指教ANT,转载请注明原文链接:https://www.cnblogs.com/wangbiaohistory/p/17228387.html