How to run a server program in the background on Linux or Windows?
843829Sep 21 2005 — edited Dec 2 2005I just finished writing a Java network application with multiple clients and one server.
However, I am not sure how I can run the server (SomeServer.class) in the background on Windows. Also when I am running it on Linux, I don't want it to terminate when I logout of the Linux shell.
To run the server on Linux, should I use a command like this?
nohup java -cp . SomeServer.class > output.txt &
Or is there another command, or perhaps some code that I can add to the program so that it would run in the background automatically and/or continues even when I logout of the Linux shell??
Sometimes, I also like to run the program on a Windows XP machine for testing purpose. How can I do it so that it runs in the background without openning a Console/Command Prompt window??
(redirecting the standard output to a file)
And is there an easy way to create a EXE file that runs the program with the default JRE in windows?