我正在调试一个 jnlp 应用程序,以前可以通过 eclipse 远程调试它,但现在不行了。
启动它的命令是:
/usr/java/jdk1.6.0_14/jre/bin/java -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1445 -Djnlpx.heapsize=64m,512m -DtrustProxy=true -Xverify:remote -Djava.security.policy=/lib/security/javaws.policy -Dfile.encoding=UTF-8 -Xbootclasspath/a:/usr/java/jdk1.6.0_14/jre/lib/deploy.jar:/usr/java/jdk1.6.0_14/jre/lib/javaws.jar:/usr/java/jdk1.6.0_14/jre/lib/plugin.jar -classpath /usr/java/jdk1.6.0_14/jre/lib/deploy.jar com.sun.javaws.Main launch.jnlp
Listening for transport dt_socket at address: 1445
问题是,当我附加 Eclipse 调试器时,它会关闭并重新启动;所以调试器附加到第一个进程;当它死掉时,调试器也会死掉。
调试器脚本实际上并不重要;如果 suspend=n ,则 jnlp 进程会在调试器启动之前自行重新启动。
我尝试过跟踪它,但选项 -XX:TraceSupport=true (以及我尝试过的其他变体)会导致 jvm 错误。
我正在使用 fedora 11,即面向 Web 开发人员的 Eclipse Java EE IDE。 (版本号:20090621-0832)
我问是否有人知道如何解决这个问题,或者至少如何打开更好的日志记录(即,将所有控制台输出捕获到日志中;以便我可以查看第一个在我的屏幕上闪烁一毫秒的控制台)
谢谢!
I'm debugging a jnlp application, and I used to be able to remote debug it through eclipse, but not anymore.
the command to start it is:
/usr/java/jdk1.6.0_14/jre/bin/java -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1445 -Djnlpx.heapsize=64m,512m -DtrustProxy=true -Xverify:remote -Djava.security.policy=/lib/security/javaws.policy -Dfile.encoding=UTF-8 -Xbootclasspath/a:/usr/java/jdk1.6.0_14/jre/lib/deploy.jar:/usr/java/jdk1.6.0_14/jre/lib/javaws.jar:/usr/java/jdk1.6.0_14/jre/lib/plugin.jar -classpath /usr/java/jdk1.6.0_14/jre/lib/deploy.jar com.sun.javaws.Main launch.jnlp
Listening for transport dt_socket at address: 1445
and the problem is that when I attach the eclipse debugger, it shuts down and restarts; so the debugger attaches to the first process; and when that dies so does the debugger.
the debugger script actually doesn't matter; as the jnlp process re-starts on its own before the debugger ever gets launched if suspend=n .
I've tried tracing it, but the option -XX:TraceSupport=true (and other variations I have tried) causes a jvm error.
I'm using fedora 11, Eclipse Java EE IDE for Web Developers. (Build id: 20090621-0832)
I'm asking if anyone knows how to fix this, or at least how to turn on better logging (ie, capture all the console output to a log; so that I can take a look at the first console that flashes up on my screen for a millisecond)
thanks!
发布评论
评论(2)
这篇博客文章包含您可以设置的环境变量调试jnlp。这一直对我有用。
This blog post has environment variables you can set to debug jnlp. This has always worked for me.
我的老板找到了答案:
重新编译并修复了一个希望不相关的问题(换行符导致签名的 APPLICATION.JNLP 和 launch.jnlp 看起来不“相同”)后,调试器现在正在工作。
My Boss found the answer:
after recompiling and fixing a hopefully unrelated issue where newlines were causing the signed APPLICATION.JNLP and the launch.jnlp to not appear to be "the same", the debugger is now working.