Unable to debug JNLP with Java 8

…衆ロ難τιáo~ 提交于 2019-12-08 19:04:21

问题


I have tried all ways

running application as

1) javaws -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9123 My.jnlp

2) setting the same option in JAVA_TOOL_OPTIONS

3) setting the same option in JAVAWS_VM_ARGS

4) setting the same option (without -J) in Java control panel

Tried the same options with or without Xnoagent

Each and every way, after doing it when I try to connect from eclipse - it cannot connect. When I do netstat -a - it doesn't show anyone listening on 9123.

I am on windows 10


回答1:


The solution reported in Remote debugging java web start under JVM 1.8

is good, but, on windows environment, you have to follow exactly the indication putting everything in a batch file and invoking that one. I have just tried even with java 9 creating a file launchMyJnlp.bat with this content.

setlocal

set JAVAWS_TRACE_NATIVE=1
set JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n %JAVA_TOOL_OPTIONS%

"c:\Program Files\Java\jre-9"\bin\javaws my.jnlp

endlocal

Launching >launchMyJnlp.bat I found the application listening on port 9999 has expected!



来源:https://stackoverflow.com/questions/45277361/unable-to-debug-jnlp-with-java-8

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