Sunday, January 23, 2022

Run Executable JAR in background on Linux

Nohup means, no hang up. 

The nohup utility makes the command passed as an argument run in the background even after you log out.

After the command is run, it is the foreground process

  • nohup java -jar xxx.jar

& Let the program run in the background

  • java -jar xxx.jar &

 

Processing of log files

The command will generate one by default nohup.out, file to log, standard output and error output will be in this file.

nohup.out file can be accessed using the below-mentioned command:

  • tail –f nohup.out

 

 


Resources
:

·        https://developpaper.com/nohup-and-let-the-program-run-in-the-background/#:~:text=use%20nohup%20java%20%2Djar%20xxx,you%20specify%20%3E%20Specify%20your%20file.

No comments:

Post a Comment

Popular Posts

Most Featured Post

GitHub: Squash all commits in PR

  Command Meaning git fetch origin Get the latest origin/master . git reset --soft origin/master Move your branch to match origin/master , b...