I have written a couple of shell scripts to run command line java programs from linux. One of the benefits I've found is that I can pass additional arguments to the jvm and use the script to pass environment variables to the jvm as system properties. Here's an example script I wrote:
This illustrates both features I described earlier. I have set the maximum heap size to 256 megabytes, and the script checks for the existance of the environment variable MOLDATA which it passes to the property devries.radxfer.moldata if it exists. the "$@" means insert the script's command line arguments here.
To create an rc script I would take a look at your system's init.d scripts and use a similar format. Debian provides /etc/init.d/skeleton as an example init.d script which uses their start-stop-daemon program to start and stop your daemon.
Chris [ April 19, 2005: Message edited by: Chris De Vries ]