How do i let a java process behave like a daemon process

i want to make a java application that will start up and remain running so it can accept client connections and i also want to be able to have some sort of application to stop the daemon process.How do i go about doing this
[237 byte] By [kenalexa] at [2007-10-3 4:12:46]
# 1

Your Java app needs to listen on a socket for an incoming "close" request. The Java app would then should down neatly (maybe by interrupting the main processing thread).

You would then have to code a script which would send the appropriate close sequence to the socket. Look at some of the Java networking/sockets tutorials.

oxbow_lakesa at 2007-7-14 22:13:34 > top of Java-index,Java Essentials,Java Programming...
# 2
thanks, i'll look at the tutorial
kenalexa at 2007-7-14 22:13:34 > top of Java-index,Java Essentials,Java Programming...
# 3
http://jakarta.apache.org/commons/daemon/
malcolmmca at 2007-7-14 22:13:34 > top of Java-index,Java Essentials,Java Programming...