如何使用WinRun4J将Java应用程序作为Windows服务运行

如何使用WinRun4J将Java应用程序作为Windows服务运行,java,windows,windows-services,winrun4j,Java,Windows,Windows Services,Winrun4j,我正在尝试使用WinRun4J将Java应用程序作为Windows服务运行 我在我的应用程序目录中复制了WinRun4J64c.exe,并将以下service.ini文件放在旁边: service.class=org.boris.winrun4j.MainService service.id=MyAPP service.name=MyAPP service.description=some description classpath.1=./lib/* classpath.2=WinRun4J

我正在尝试使用WinRun4J将Java应用程序作为Windows服务运行

我在我的应用程序目录中复制了WinRun4J64c.exe,并将以下service.ini文件放在旁边:

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
但是如果我使用以下命令启动服务:
WinRun4J64c.exe--WinRun4J:RegisterService
我会得到:

Service control dispatcher error: 1063

怎么了?

我没有让它工作,所以我的解决方法是使用。我使用以下参数执行了包含的prunsrv.exe:

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