java jar background started in three ways

java jar start
linux start java -jar background to run the program
directly with the java -jar xxx.jar, when you exit or close the shell, the program will stop off. The following method allows jar has been running in the background after the operation.

java -jar xxx.jar &

Description: Add an ampersand at the end

(1) execute java -jar xxx.jar

(2) ctrl + z exit to the console is executed bg

(3)exit

After the above three steps, exit SHELL, jar service has been running in the background.

nohup java -jar xxxx.jar & (推荐)

Published 175 original articles · won praise 76 · Views 230,000 +

Guess you like

Origin blog.csdn.net/qq_29232943/article/details/104729359