Hi there, I was searching throw google and mailing list but still can't find a solution. The problem is.... I want to create a windows service that start/stop the rmiregistry for a given port. I develop a class very similar, but even simplier to ServiceDaemon showed in the samples. Then according to the http://commons.apache.org/daemon/procrun.html I install the service with the current comand line (I'm using the tomcat5.exe like it was procrun, cause i read in the mailing list it's the same and already compiled for windows):
set my_path=C:\DaemonTest\ C:\apache-tomcat-5.5.23\bin\tomcat5 //IS//tomcat5 --DisplayName=APAGAR --Classpath="%my_path%TryDaemon.jar";"%my_path%commons-daemon.jar" --Jvm=auto --StartMode=jvm --StopMode=jvm --StartClass=samples.ServiceDaemon --StopClass=samples.ServiceDaemon --Install="C:\apache-tomcat-5.5.23\bin\tomcat5.exe" --LogPath="C:\apache-tomcat-5.5.23\logs" --LogLevel="debug" --StdOutput="stdout.log" --StdError="stderror.log" --Type=interactive Then when i start the service it fails to start given an "Error 1067: The process terminated unexpectedly"... The class samples.ServiceDaemon is inside the TryDaemon.jar. I have no idea about what am i missing. I already try to give the --StartMethod=start and --StopMethod=stop but it's the same. In the log i only have this: [2008-11-27 15:45:27] [1276 prunsrv.c] [debug] Procrun log initialized [2008-11-27 15:45:27] [521 prunsrv.c] [debug] Installing service... [2008-11-27 15:45:27] [info] Service tomcat5 name APAGAR [2008-11-27 15:45:27] [info] Service tomcat5 installed [2008-11-27 15:45:27] [info] Procrun finished. [2008-11-27 15:45:40] [1276 prunsrv.c] [debug] Procrun log initialized [2008-11-27 15:45:40] [info] Debugging Service... [2008-11-27 15:45:40] [1098 prunsrv.c] [debug] Inside ServiceMain... Any help/Tips you can give is welcome. Thanks, Bruno Pereira
