日期:2014-05-17  浏览次数:20997 次

commons-daemon-1.0.13-bin-windows 注册成服务

?

?

1.下载prunsrv

?

2.配置java方式启动

?

set location=F:\workspace2\slf4j-7road\slf4j-7road\build

set prunsrv=%location%\commons-daemon-1.0.13-bin-windows

set classpath=%CLASSPATH%;%location%\config;%location%\slf4j-test-0.0.1-SNAPSHOT-jar-with-dependencies.jar;

?

prunsrv //IS//LogServer --DisplayName="LogServer" --Install=%prunsrv%\prunsrv.exe --Startup=auto --StartMode=java --Classpath=%classpath% --StartClass=com.test.server.LogServer ++JvmOptions=-Dlocation=%location% --JvmMs=512m --JvmMx=512m --JvmSs=128k

?

3.将prunmgr.exe修改为服务名,Logserver.exe