commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viola lu <viola...@gmail.com>
Subject How to install a java application as windows service with prunsrv
Date Thu, 19 Aug 2010 10:25:54 GMT
HI, i want to use Apache common daemon to create my windows service for a
java application,but i met a problem here:
 My java application start command is
  java -javaagent:d:\geronimo3.0\lib\agent\transformer.jar
-Djava.endorsed.dirs=d:\geronimo3.0\lib\endorsed;"C:\Program
Files\Java\jdk1.6.0_20\jre\lib\endorsed"
-Djava.ext.dirs=d:\geronimo3.0\lib\ext;"C:\Program
Files\Java\jdk1.6.0_20\jre\lib\ext"
-Dorg.apache.geronimo.home.dir=d:\geronimo3.0 -Djava.io.tmpdir=var\temp
-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
-Dkaraf.home=d:\geronimo3.0 -Dkaraf.base=d:\geronimo3.0 -classpath
.;d:\geronimo3.0\lib\commons-cli.jar;d:\geronimo3.0\lib\geronimo-cli.jar;d:\geronimo3.0\lib\geronimo-hook.jar;d:\geronimo3.0\lib\geronimo-main.jar;d:\geronimo3.0\lib\geronimo-rmi-loader.jar;d:geronimo3.0\lib\karaf-jaas-boot.jar
  org.apache.geronimo.cli.daemon.DaemonCLI

I install it as window service
prunsrv //IS//%SERVICE_NAME% --StartMode=Java
--StartClass=org.apache.geronimo.cli.daemon.DaemonCLI
--StartPath="%GERONIMO_HOME%"
--Classpath=.;%GERONIMO_HOMElib\commons-cli.jar;d:\geronimo3.0\lib\geronimo-cli.jar;d:\geronimo3.0\lib\geronimo-hook.jar;d:\geronimo3.0\lib\geronimo-main.jar;d:\geronimo3.0\lib\geronimo-rmi-loader.jar;d:\geronimo3.0\lib\karaf-jaas-boot.jar
++JvmOptions=-Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed'
'%JRE_HOME%\lib\endorsed"
-Djava.ext.dirs="%GERONIMO_HOME%\lib\ext';'%JRE_HOME%\lib\ext"
-Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"
-Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true
-Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%"
-Djava.io.tmpdir="%GERONIMO_TMPDIR%" --StopImage %JAVA_EXE% --StopPath
"%GERONIMO_HOME%" --StopMode exe --StopParams
%JAVA_AGENT_OPTS%#-Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed';'%JRE_HOME%\lib\endorsed"#-Djava.ext.dirs="%GERONIMO_HOME%\lib\ext';'%JRE_HOME%\lib\ext"#-Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"#-Djava.io.tmpdir="%GERONIMO_TMPDIR%"#-jar#"%GERONIMO_HOME%\bin\shutdown.jar"#%SHUTDOWN_ARGS%


but this doesn't work, the java application cann't be started, no error log
to trace why. Can somebody help me? THanks in advance!

-- 
viola

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message