Remote debugging of a Java application launched as a Windows service

房东的猫 提交于 2019-12-23 17:09:56

问题


My Java application is started from within a native program through java.dll. This native program is launched as a service on Windows.

The following options have been added to the JVM args for remote debugging:

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n

In this configuration, it is impossible to connect from e.g. my Eclipse workspace. If the program is launched from the command-line, i.e. not as a service, I can connect to port 8787.

How can I allow remote debugging connections to this service?


回答1:


There's no difference if it runs as a service or from command line.

Please double-check that java.exe receives those command line params when started as service.



来源:https://stackoverflow.com/questions/461544/remote-debugging-of-a-java-application-launched-as-a-windows-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!