Run bat script running in the background to achieve the windows system and stop jar file

First built two bat file, named start.bat, stop.bat, then these two files and jar package to be executed into the same directory.
start.bat script reads:

@echo off
start javaw -jar xxx.jar
exit

stop.bat script reads:

@echo off
taskkill -f -t -im javaw.exe
exit

Start.bat on which to run jar files can be executed, and in the Task Manager can see this process, you can stop the run stop.bat the process.

Guess you like

Origin blog.csdn.net/tanwenfang/article/details/90636351