Run Java program as background process
Hello everyone,
I've got a pretty special question today. I have a regular Java application that I want to run on a linux-based server. The program is started via command-line-only SSH, which works well.
The problem is, however, that I need the program to keep running, even if there is no user logged into the system. How would you do that on command line? Any hints? I tried to find answers on Google but it's pretty hard to search for something when you do not really have a significant term for it.
Thank you,
Alan
Re: Run Java program as background process
there is a few ways
best is probably set it up as a service and have it run at boot google update-rc.d
otherwise you could run it with screen or nohup
Code:
nohup /path/to/script
Code:
screen /plath/to/script
to recall it
Re: Run Java program as background process
@SlugSlug Thank you, I'm going to try the "screen" option, looks promising :)
Re: Run Java program as background process
you could make your script use screen and then run it via init.d so it loads at boot
thats what I use