Tia*_*ira 4 java jvm windows-services
我可以使用 Apache Commons Daemon 工具作为控制台应用程序安装、卸载和运行我的服务。问题是当我尝试将应用程序作为服务运行时,服务状态不会从停止切换到运行。
用于安装服务的脚本:
prunsrv.exe install ServiceName --DisplayName="Some Display Name" --Classpath %cd%\daemon.jar --Install=prunsrv.exe --Jvm=auto --StartMode=jvm --StopMode=jvm --StartClass=Main --StartParams start --StopClass=Main --StopParams stop
Run Code Online (Sandbox Code Playgroud)
我在 Windows 8 - 64 位中运行该服务。
关于可能出现什么问题的任何想法吗?
编辑:在 services.msc 中运行应用程序时,我收到以下消息:
Windows could not start the [Service Name] service on Local Computer
Error 2: The system cannot find the file specified.
Run Code Online (Sandbox Code Playgroud)
EDIT2:在 Windows 7-64 位中尝试过。同样的问题。
| 归档时间: |
|
| 查看次数: |
3326 次 |
| 最近记录: |