Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Commons Daemon http://jakarta.apache.org/commons/daemon/index.html can be used to run executables or java applications as windows service or UNIX daemon.

To build it from source you need GNU autoconf and m4 in addition to the requirements listed in the presentation page.

FAQ

Is it possible to use the commons daemon to run a executable as Windows service?

...

Sample: Proxomitron (http://www.proxomitron.info/) as windows service

Installation:
prunsrv //IS//PROXO --DisplayName="Proxomitron Proxy" --Description="Proxomitron Web Proxy" --StartImage=c:\proxomitron\proxomitron.exe --StartPath=c:\proxomitron --Type=interactive --LogLevel=DEBUG --LogPath=c:\proxomitron\logs --LogPrefix=procrun.log --Startup=manual --StdOutput=c:\proxomitron\logs\stdout.log --StdError=c:\proxomitron\logs\stderr.log

Uninstallation:
prunsrv //DS//PROXO

Can I use the commons daemon to install (register) a Windows service?

Yes a Windows service can be installed/uninstalled using prunsrv. See the following example to install the a Windows Service called SCNService:
prunsrv //IS//SCNService --Install=%CD%\SCNService.exe --Startup=manual --DisplayName=SCNService

...

  • Copy msvcr71.dll from java’s bin directory to tomcat’s bin folder
  • Add java’s bin directory to windows environment variable
  • Copy msvcr71.dll from java’s bin directory to windows\system32 folder
  • Make sure your tomcat’s pointing to correct jvm.dll folder

Can I use the common daemon to start a Windows service?

...