一直以来没有写过Applet。最近在修改代码的时候设计到Applet,怎么调试呢?
网上查找了一下以下方法是可行的。转了过来。
1) First enable remote debugging in the Java Plugin:
a) Start –> Settings –> Control Panel –> Java –> Java Applet Runtime Settings –> View
b) Add the following to the “Java Runtime Parameters”:
-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

2) Close all Web browser Windows
3) Put breakpoints in your source code (you need to have an Eclipse project containing the applet source code)
4) In Eclipse create a remote debugging configuration:
a) Run –> Open Debug Dialog –> Remote Java Application –> New
b) Assign host = localhost and port = 8000
Allow temination of remote VM 选择上。
然后点击Debug按钮就可以debug了。
本文介绍了一种通过远程调试的方式调试Applet的方法。首先需要在Java插件中启用远程调试,并设置相应的参数。关闭所有浏览器窗口后,在源代码中设置断点,并在Eclipse中创建远程调试配置。
5596

被折叠的 条评论
为什么被折叠?



