NetBeans: Specifying html for Applet which uses JSObject for debugging
I would like to specify html for my applet and debug it in NetBeans.
The helpful is following:
My applet class is MainApplet
.
I put MainClass.html
in the same folder with MainApplet.java
.
After this I ru开发者_如何学Pythonn applet via right click on file in NetBeans and selecting Debug "MainApplet.java".
It looks like applet tag from MainApplet.html
is used, e.g. dimensions of applet are taken from my MainApplet.html
.
BUT:
When netscape.javascript.JSObject.getWindow(this)
is called in applet netscape.javascript.JSException
is thrown. This is when running applet in applet viewer.
In browser all works good - no exception thrown.
Is it possible to debug applet by right click on it in NetBeans and select Debug and at the same time JSObject.getWindow(this)
is executed successfully?
What should be configured to obtain such behaviour?
I use NetBeans 6.5
If there are completely different scenarios which result in easy debug it would be good to know about them as well.
Debugging an applet uses appletviewer, not a true browser. You can however, debug an applet running in a browser. Here's the explanation of how it's done: Debugging Applet Remotely
精彩评论