Networking Forums

Networking Forums > Computer Networking > Linux Networking > how to run a java program as a daemon?

Reply
Thread Tools Display Modes

how to run a java program as a daemon?

 
 
vizlab
Guest
Posts: n/a

 
      12-13-2004, 03:14 PM
Dear all:
I have a java program which is used as a server.
java -cp MyServer MyServer.Main
But as soon as I exit the putty session, the program also exit automatically.
How can I run this program as a daemon?
Thanks a lot.

Best
 
Reply With Quote
 
 
 
 
Davide Bianchi
Guest
Posts: n/a

 
      12-13-2004, 03:26 PM
On 2004-12-13, vizlab <(E-Mail Removed)> wrote:
> java -cp MyServer MyServer.Main
> But as soon as I exit the putty session,


Add a '&' at the end of the command.
Davide

--
Bang on the LEFT side of your computer to restart Windows.
 
Reply With Quote
 
Alexander Clouter
Guest
Posts: n/a

 
      12-13-2004, 06:09 PM
On 2004-12-13, vizlab <(E-Mail Removed)> wrote:
> Dear all:
> I have a java program which is used as a server.
> java -cp MyServer MyServer.Main
> But as soon as I exit the putty session, the program also exit automatically.
> How can I run this program as a daemon?
> Thanks a lot.
>

Slip a 'nohup' in there. So:

$ nohup java -cp MyServer MyServer.Main &

Cheers

Alex

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
c++, java, cobol rogergoose@googlemail.com Linux Networking 0 02-26-2008 03:44 PM
P2P: emulators, Java 418928@cepsz.unizar.es Wireless Internet 1 03-09-2007 04:56 PM
Program Scheduler to start and end a program? Kevin Wooloff Home Networking 1 09-05-2006 04:10 PM
Java =?Utf-8?B?TG9yaQ==?= Windows Networking 0 05-28-2004 05:16 PM
Java.exe error Md Kamil Windows Networking 3 01-07-2004 04:27 PM



1 2 3 4 5 6 7 8 9 10 11