[ACCEPTED]-Run Java application as a service-windows-services
There's an LGPL clone of the Java Service 7 Wrapper: http://yajsw.sourceforge.net
BTW, IANAL, but I suspect that 6 JSW people are spreading FUD, and their 5 software can be used to service-enable commercial 4 applications under GPL license, just like 3 one can gzip a commercial app for redistribution. I 2 could be completely wrong about this, though 1 :)
A program that should run as windows service 9 must provide certain functions that the 8 windows service manager uses to communicate 7 with that service.
As long as there is no 6 JVM that implements this functions directly 5 (and I know of none) you will need some 4 kind of wrapper.
I have successfully used 3 srvany for a java based windows service (Basically 2 it allows to run any program as windows 1 service and it works fine with java)
You can use NSSM like this:
nssm install MyService "%JAVA_HOME%\bin\java.exe" -jar "path\to\the\file.jar"
0
The most simple way I found was RunAsService.
A co-worker 2 recommended a tool called SC, but I did not 1 try it.
JSmooth can do it, and it is scriptable 1 with ant.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.