asha - 2014-04-04

Hi,

I am trying to convert my java application to windows service. I have downloaded the latest version of WinRun4J . I am able to register the service successfully. But when I try to start the service I am getting following error:

[info] Module Name: C:\Users\asha.j\Desktop\WMIAGENT\wmiagent.exe
[info] Module INI: C:\Users\asha.j\Desktop\WMIAGENT\wmiagent.ini
[info] Module Dir: C:\Users\asha.j\Desktop\WMIAGENT\ [info] INI Dir: C:\Users\asha.j\Desktop\WMIAGENT\ [info] Working directory set to: C:\Users\asha.j\Desktop\WMIAGENT
[info] Configured vm.location:
[info] Found VM: C:\Program Files\Java\jre7\bin\client\jvm.dll
[info] Expanding Classpath: C:\JARS*
[info] Expanding Classpath: C:\JARS/jaawin.jar
[info] Expanding Classpath: C:\JARS/JavaService.jar
[info] Expanding Classpath: C:\JARS/log.txt
[info] Expanding Classpath: C:\JARS/WinRun4J.jar
[info] Generated Classpath: C:\JARS\jaawin.jar;C:\JARS\JavaService.jar;C:\JARS\log.txt;C:\JARS\WinRun4J.jar
[info] VM Args:
[info] vmarg.0=-Xdebug
[info] vmarg.1=-Xnoagent
[info] vmarg.2=-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n
[info] vmarg.3=-Djava.class.path=C:\JARS\jaawin.jar;C:\JARS\JavaService.jar;C:\JARS\log.txt;C:\JARS\WinRun4J.jar
Listening for transport dt_socket at address: 8787
[info] Registering natives for Native class
[info] Registering natives for FFI class
[err] Could not find control method class
[err] Failed to initialise service: 1
java.lang.NoSuchMethodError: serviceRequest

my .ini file contents are as follows:

service.class=javaservice.JavaService
service.id=jWMIAgent
service.name=WMI Agent Service
service.description=java wmi agent service application.

classpath.1=C:\JARS*

vmarg.1=-Xdebug
vmarg.2=-Xnoagent
vmarg.3=-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

log=C:/JARS/log.txt
log.overwrite=true

I tried to modify the service.class by reading the discussion on the following link without success . I am not able to register the service in that case https://sourceforge.net/p/winrun4j/discussion/693148/thread/fddbd07b/

Thanks in advance