First, start the following command
java -jar xxx.jar 或者 start javaw -jar xxx.jar
Such start up the service, could not find the name close
Second, the solution:
1, modify the startup mode:
Copy java.exe or javaw.exe in the bin directory for the project name, such as cdqm.exe
Start command becomes cdqm -jar xxx.jar or start cdqm -jar xxx.jar
2, View
So the Task Manager will appear as cdqm.exe, instead of java.exe.
3, close the command
Close command taskkill / f / im cdqm.exe / T to
Third, this startup script, shutdown script may be:
start.bat
@echo off
cdqm -jar xxx.jar
@echo off
start cdqm -Xms2048M -Xmx2048M -Xss1M -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=512M -jar rskrpt-timer-1.0-SNAPSHOT.jar -Duser.timezone=Asia/Shanghai -Dfile-encoding=utf-8 --spring.profiles.active=prod
exit
shutdown.bat
taskkill /f /im cdqm.exe /T