使用eclipse远程调试jnlp应用程序 [英] remote debugging a jnlp application with eclipse

查看:124
本文介绍了使用eclipse远程调试jnlp应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试一个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 
侦听运输dt_socket在地址:1445

,问题是当我附加eclipse调试器时,它会关闭并重新启动;所以调试器附加到第一个进程;当调试器死机的时候,调试器脚本实际上并不重要,



因为jnlp进程在调试器被启动之前自动重新启动,如果suspend = n。



我尝试过跟踪它,但是选项-XX:TraceSupport = true(和我尝试过的其他变体)会导致jvm错误。



我使用的是Fedora 11,用于Web开发人员的Eclipse Java EE IDE。 (Build id:20090621-0832)



我问是否有人知道如何解决这个问题,或至少如何打开更好的日志记录(即捕获所有的控制台输出到一个日志;所以我可以看看在我的屏幕上闪烁一个毫秒的第一个控制台)



谢谢!

解决方案

我的老板找到答案:


jnlp文件中的< property>标签
与较新的JRE相比,更为限制性的是
。根据
Sun文档



对于不受信任的应用程序,JNLP文件中设置的系统
属性将仅由Java Web Start设置,如果
被认为是安全的,或者
属性名称以jnlp开头。或
javaws。。



看起来像不受信任的状态
导致应用程序第二次启动

在重新编译并修复了一个有希望的无关问题,其中换行符导致已签署的APPLICATION.JNLP和启动.jnlp不显示为相同,调试器现在正在工作。


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!

解决方案

My Boss found the answer:

It appears that the "<property>" tags in the jnlp file are more restrictive with the newer JRE. According to the Sun documentation:

"For an untrusted application, system properties set in the JNLP file will only be set by Java Web Start if they are considered secure, or if the property name begins with "jnlp." or "javaws."."

It looks like the untrusted status causes the application to launch a second time with the appropriate properties.

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.

这篇关于使用eclipse远程调试jnlp应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆