commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: [procrun] How to start a java service?
Date Wed, 15 Dec 2010 10:41:36 GMT
On 12/15/2010 09:49 AM, P.N. wrote:
>
> Hello!
>
> I'm trying to start a java app as a windows service.
>
> I've installed the app using:
>
> commons-daemon\prunsrv.exe //IS//MyService --DisplayName="My Description" --Install=K:\my\path\commons-daemon\prunsrv.exe
--Classpath=K:\my\path\MyOwnService.jar;K:\my\path\myApp.jar --Jvm=C:\path\to\jre\bin\server\jvm.dll
--JvmMx=512
> --JvmOptions="-Dmy.option=xyz" --StartMode=jvm --StartClass=my.wrapper.MyServiceClass
--StartMethod=start --StartParams="-a:b;-c:d" --StopMode=jvm --StopClass=my.wrapper.MyServiceClass
--StopMethod=stop --StdOutput=auto --StdError=auto --LogLevel=Debug
>
> Result: Service is installed.
>
> When trying to start my service (from Services console), I'm getting an error 3 (Path
does not exist). No path is given, and all the paths do exist and are changed to be absolute,
as You can see above.
>

Once when installed you can check the config with
prunmgr.exe //ES//MyService to see if some params are wrongly set.

Also try running in console mode first.
prunsrv.exe //TS//MyService
It should usually give you more info then from service mode.



Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message