I am trying to install and start a service with prunsrv.exe for an application
I am able to install the service alright but the service wont start up and gives me an error
Also following is the configuration that is used to install the service using prunsrv.exe
set SERVICE_NAME=TestService
REM Service log configuration
set PR_LOGPREFIX=%SERVICE_NAME%
set PR_LOGPATH=D:\setups\Commons_Daemon\commons-daemon-1.0.14-bin-windows\logs
set PR_STDOUTPUT=auto
set PR_STDERROR=auto
set PR_LOGLEVEL=INFO
REM Path to java installation
set PR_JVM=C:\Program Files\Java\jre1.6.0_04\bin\client\jvm.dll
set PR_CLASSPATH=D:\setups\Commons_Daemon\commons-daemon-1.0.14-bin-windows\temp.jar;
REM Startup configuration
set PR_STARTUP=auto
set PR_STARTMODE=java
set PR_STARTCLASS=Trys.AppLauncher
set PR_STARTMETHOD=start
REM Shutdown configuration
set PR_STOPMODE=java
set PR_STOPCLASS=Trys.AppLauncher
set PR_STOPMETHOD=stop
REM JVM configuration
set PR_JVMMS=64
set PR_JVMMX=128
set PR_JVMSS=4000
REM Install service
prunsrv.exe //IS//%SERVICE_NAME%
The above config is packaged to a batch file is executed to install the service
Also the log files are not generated, due which i cant even debug.
Please tell me where i am going wrong
What is prunsrv.exe? prunsrv.exe is part of Commons Daemon Service Runner and developed by Apache Software Foundation according to the prunsrv.exe version information. prunsrv.exe's description is "Commons Daemon Service Runner" prunsrv.exe is usually located in the 'C:\nxfilter\' folder.
Procrun is a set of applications that allow Windows users to wrap (mostly) Java applications (e.g. Tomcat) as a Windows service. The service can be set to automatically start when the machine boots and will continue to run with no user logged onto the machine.
Jsvc is a set of libraries and applications for making Java applications run on UNIX more easily. Jsvc allows the application (e.g. Tomcat) to perform some privileged operations as root (e.g. bind to a port < 1024), and then switch identity to a non-privileged user.
one possible issue is using wrong prunsvr.exe
. for 64 bit java install, use amd64/prunsvr.exe
, for 32 bit java install, use /prunsvr.exe
in commons-deamon-xxx-bin-windows.zip file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With