Question

I'm trying to run a Java application as a Windows service with WinRun4J.

I copied WinRun4J64c.exe in my application directory and placed the following service.ini file beside:

service.class=org.boris.winrun4j.MainService
service.id=MyAPP
service.name=MyAPP
service.description=some description

classpath.1=./lib/*
classpath.2=WinRun4J.jar

[MainService]
class=play.core.server.NettyServer

But if I start the service with: WinRun4J64c.exe --WinRun4J:RegisterService I get:

Service control dispatcher error: 1063

What is wrong?

Was it helpful?

Solution

I didn't get it working, so my workaround is to use Apache Commons Deamon. I executed the included prunsrv.exe with the following parameters:

prunsrv.exe install "MeineAnwendung" \
--Install="C:/pfad/zu/prunsrv.exe" \
--JvmOptions=-Dpidfile.path=NUL
--Jvm=auto \
--Startup=auto \
--StartMode=jvm \
--Classpath="c:/irgendwo/anwendung/lib/*;" \
--StartClass=play.core.server.NettyServer
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top