Hello!

  Applications "tie" themselves to the console window in a parent/child
relationship. (once the parent goes away, so do all the children!) What you 
need to do is detach the process from the terminal.  One way of doing this 
is to run it as a daemon (if there are other ways, I do not know them ), 
which essentially forks a process(which copies the process), and exits that 
process, leaving a detached child process(your java app, in this case).   It 
is somewhat of a nuiscance to do from within java, since you'll need to make 
a native call to do so. (going through JNI).
The native portion is only about 6 lines long, and good unix book should be 
able to tell you how to do that.   I suppose you could avoid the JNI call 
altogether by writing a native program that could daemonize any program, and 
then calling your program from it via command line.  I"ve done both, the JNI 
call is a bit cleaner, since it ends up using only one process.

  Hope this helps,
     Andrew

>From: "Yasuhiro Kaizu" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: How to keep the application running on the server
>Date: Sun, 27 Aug 2000 14:23:32 +0900
>
>Hello
>
>I want to run the Java application on the remote server (Red Hat Linux 6.2)
>through the telnet.  The application starts without problem, but if I close
>the telnet window, the application on the server also stops.  This means
>that I must keep the telnet window open on my client PC all day if I keep
>the application running on the server!  Does anyone know how to keep the
>Java application running on the server after closing the telnet window on
>the client PC?
>
>Yasuhiro Kaizu
>[EMAIL PROTECTED]
>
>
>
>----------------------------------------------------------------------
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to