Just make a startupscript and shutdownscript and put it in
/etc/rc.d/rc5.d
That is for Redhat runlevel5, which I run.
If you run another Linux-distro I guess you'll find an other appropriate
place.
In the script just run your program as you always do, like this:
java yourApp
Maybe remember the PID and store it somewhere, I am not sure how you want to
set it up.
To shutdown your program you need the PID to send it a kill-signal.
Use S55yourjavaapp and K55yourjavaapp as scriptsnames where S stands for
Startup and K for kill.
The numbers are executed in order.
So if you want your java-app to start late, use number 99, or another one
that is free.
Good luck.
Regards,
Erwin
If you mean that you want to put it in the background so that it will
stay there after you've logged out, then run it like this:
nohup java MyjavaApplication < /dev/null > /dev/null 2>&1 &
If you want to save its output, change the second "/dev/null" in the
example to the name of a suitable logfile.
If you meant something else, be more specific.
/gordon
--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e