Report this

What is the reason for this report?

linux background execution

Posted on July 2, 2014

I have embed jetty java application and I want to execute in linux digitalocean. When console is closed, application is stop. How can I execute java application without stopping



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

nohup java -jar /web/server.jar & The & symbol, switches the program to run in the background.

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

nohup <command and arguments> &

I have been using tmux for easy access to the individual command lines of multiple programs running 24/7 and am rather fond of it. I have no idea if this solution is anywhere optimal however.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.