The Linux Run Jar Pack command is as follows:
Mode one:
Java-jar Xxx.jar
Features: The current SSH window is locked, you can press CTRL + C interrupt the program to run, or directly close the window, program exit
How to keep the window unlocked.
Mode two
Java-jar Xxx.jar &
& Reps run in the background.
Specific: The current SSH window is not locked, but the program aborts when the window is closed.
Continue to improve, how to let the window shut down when the program is still running.
Mode three
Nohup Java-jar Xxx.jar &
Nohup means not to hang up the Run command, the program still runs when the account exits or the terminal closes
When a job is executed with the nohup command, all output of the job is redirected to the Nohup.out file by default, unless the output file is otherwise specified.
Mode Four
Nohup Java-jar Xxx.jar >temp.txt &
Explain the >temp.txt.
Command >out.file
Command >out.file redirects the command's output to the Out.file file, where the output does not print to the screen, but is output to the Out.file file.
Background run tasks can be viewed through the jobs command
Jobs
All background-performed jobs are listed, and there is a number in front of each job.
If you want to recall a job to the foreground control, you only need FG + number.
FG 23