我试图通过Apache procrun作为Windows服务运行的Java应用程序遇到问题。
该应用程序由2个组件组成,这是Java组件,该组件位于应用程序的主要部分。还有一个C组件,使Java应用程序可以与某些硬件进行通信。两者之间的接口使用Java本机接口(JNI)。
如果C组件崩溃,则整个JVM也将关闭。但是,在procrun中,这将作为“ VM退出代码:0”返回。(参见下面)
[2013-06-27 11:55:47] [debug] ( prunsrv.c:1528) [ 8488] Waiting for worker to finish...
[2013-06-27 11:55:55] [debug] ( javajni.c:964 ) [ 5716] Java Worker thread finished applicationName/core/applicationNameCore:main with status=0
[2013-06-27 11:55:55] [debug] ( prunsrv.c:1533) [ 8488] Worker finished.
[2013-06-27 11:55:55] [debug] ( prunsrv.c:1559) [ 8488] Waiting for all threads to exit
[2013-06-27 11:56:46] [debug] ( prunsrv.c:919 ) [10160] Start exit hook called ...
[2013-06-27 11:56:46] [debug] ( prunsrv.c:920 ) [10160] VM exit code: 0
[2013-06-27 11:56:46] [debug] …Run Code Online (Sandbox Code Playgroud)