nohup java -jar java project start

Start the process

nohup java -jar babyshark-0.0.1-SNAPSHOT.jar > log.file 2>&1 &

 

The meaning of the above 1 and 2 is as follows:

0 standard input (typically a keyboard)
a standard output (usually the display screen, the user terminal console)
2 standard error (error information output)

Close process

// Process
ps aux | grep java
kill -9 pid

Guess you like

Origin www.cnblogs.com/dch0/p/12576476.html