无法使用Java 8调试JNLP [英] Unable to debug JNLP with Java 8
问题描述
我已经尝试了所有方法
运行应用程序为
1)javaws -J-Xdebug -J -Xrunjdwp:transport = dt_socket,server = y,suspend = n,address = 9123 My.jnlp
1) javaws -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9123 My.jnlp
2)在JAVA_TOOL_OPTIONS
2) setting the same option in JAVA_TOOL_OPTIONS
3)在JAVAWS_VM_ARGS中设置相同的选项
3) setting the same option in JAVAWS_VM_ARGS
4)在Java控制面板中设置相同的选项(不带-J)
4) setting the same option (without -J) in Java control panel
使用或不使用Xnoagent尝试相同的选择
Tried the same options with or without Xnoagent
在尝试从eclipse连接后,每种方法-无法连接。当我执行netstat -a时,它不会显示有人在听9123。
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.
我在Windows 10上
I am on windows 10
推荐答案
该解决方案在
在JVM 1.8下远程调试Java Web Start
很好,但是,在Windows环境中,您必须完全遵循指示批处理文件中的所有内容并调用该文件。
我什至尝试使用Java 9创建具有此内容的文件launchMyJnlp.bat。
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
启动> launchMyJnlp.bat,我发现在端口9999上侦听的应用程序是预期的!
Launching >launchMyJnlp.bat I found the application listening on port 9999 has expected!
这篇关于无法使用Java 8调试JNLP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!