Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Java application as a service

Tags:

I would like to run a Java application as a service. Unfortunately, I am limited in that I can't use something like the Java Service Wrapper (which does appear to be an excellent tool).

Is there any way of running an executable JAR, as a service, without relying on external applications? I currently have the service installed, but it fails to start. This is where I am getting stuck and I haven't been able to find anything on Google other than information about the JSW.

like image 857
JasCav Avatar asked Sep 10 '09 16:09

JasCav


2 Answers

There's an LGPL clone of the Java Service Wrapper: http://yajsw.sourceforge.net

BTW, IANAL, but I suspect that JSW people are spreading FUD, and their software can be used to service-enable commercial applications under GPL license, just like one can gzip a commercial app for redistribution. I could be completely wrong about this, though :)

like image 79
ykaganovich Avatar answered Oct 15 '22 05:10

ykaganovich


Another option, Apache Commons Daemon's procrun.

See http://commons.apache.org/daemon/

like image 21
cpierceworld Avatar answered Oct 15 '22 05:10

cpierceworld