A
Alessandro
Hi,
I need to start a java application as Windows Service, I'm using tool
JavaService, considered by many people as "standard de facto" about making
java applications services.
It should be very easy but I can't do it ... reading manuals and examples,
it creates correctly the service but it remains in "starting" status also
after reboot.
This is BAT file about example application included in the install packet
(Java Service ver 2.0.10, Windows XP Professional, admin user), a bit
modified to be simpler:
//START BAT
@echo off
cls
set JAVASERVICE_PATH=C:\Java Service 2.0.10
set JAVA_HOME=C:\Programmi\Java\jdk1.6.0_06
SET APPLICATION_HOME=C:\Java Service 2.0.10
set SERVICE_NAME=SimpleService
set PATH=%PATH%;"%JAVASERVICE_PATH%"
javaservice -install %SERVICE_NAME%
%JAVA_HOME%\jre\bin\server\jvm.dll -Djava.class.path="%APPLICATION_HOM%"\SampleService.jar
-Xms16M -Xmx32M -start org.objectweb.javaservice.test.SampleService -params
start memory -stop org.objectweb.javaservice.test.SampleService -method
serviceStop -out "%APPLICATION_HOME%"\stdout.log -err
"%APPLICATION_HOME%"\stderr.log
pause
//END BAT
Thanks and best regards for any idea,
Alessandro
I need to start a java application as Windows Service, I'm using tool
JavaService, considered by many people as "standard de facto" about making
java applications services.
It should be very easy but I can't do it ... reading manuals and examples,
it creates correctly the service but it remains in "starting" status also
after reboot.
This is BAT file about example application included in the install packet
(Java Service ver 2.0.10, Windows XP Professional, admin user), a bit
modified to be simpler:
//START BAT
@echo off
cls
set JAVASERVICE_PATH=C:\Java Service 2.0.10
set JAVA_HOME=C:\Programmi\Java\jdk1.6.0_06
SET APPLICATION_HOME=C:\Java Service 2.0.10
set SERVICE_NAME=SimpleService
set PATH=%PATH%;"%JAVASERVICE_PATH%"
javaservice -install %SERVICE_NAME%
%JAVA_HOME%\jre\bin\server\jvm.dll -Djava.class.path="%APPLICATION_HOM%"\SampleService.jar
-Xms16M -Xmx32M -start org.objectweb.javaservice.test.SampleService -params
start memory -stop org.objectweb.javaservice.test.SampleService -method
serviceStop -out "%APPLICATION_HOME%"\stdout.log -err
"%APPLICATION_HOME%"\stderr.log
pause
//END BAT
Thanks and best regards for any idea,
Alessandro