hi i want to run my java program as daemon service as i have a jar file for that program does any one has general daemon script that runs at boot and can be start stop and restart so please share it with me in which i will simply change the path of jar with my jar file and i would use it
i have search for it a lot i have found 2 to 3 script but they have some error so i cant use them i will mention there link also,
http://www.source-code.biz/snippets/java/7.htm
http://www.apexninjas.com/blog/f?p=100:1:0::::P1_ARTICLE:1460
http://zerocool.is-a-geek.net/?p=139
the last link is not giving any error but it is not running service too as i check it using command "service vsftpdg status" so there is no service found error in that last link i use code and just change the path for my jar file and it would be like this,
nohup java -jar /usr/local/vsftpdg/helloworld.jar /usr/local/vsftpdg 2>> /dev/null >> /dev/null &
echo $! > /usr/local/vsftpdg/pid
and the path changes the same as it need in the further code i mentioned the way i change the file path as above after a serarching for more then a week i am asking for general script that would run my jar file
Hopes for your help thanks in advance