Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I locate the line that causes an exception when an applet runs in a browser?

0
Posted

Can I locate the line that causes an exception when an applet runs in a browser?

0

The Java Console traps all uncaught exceptions. The Java Console displays the call stack with the line number of the code that generates the exception. As an example te following dump from the Java Console indicates that a NoClassDefFoundError exception was generated at line 57 of daisy.Susan.init(): java.lang.NoClassDefFoundError: daisy/Susan$1 at daisy.Susan.init(Susan.java:57) at sun.applet.AppletPanel.run(AppletPanel.java:333) at java.lang.Thread.run(Thread.java:479) The Java Console also catches all the messages you see flying by on the status bar of the browser. You can make the Java Console visible from Netscape by selecting Communicator/Tools/Java Console from the menu. Why does the following code not give a compiler warning: while(x < 9); { // do something } A cure for this problem is to change formatting styles so that the open brace is at the end of the preceding line: while (x < 9) { // Do something } Now when your fingers auto-type that semicolon at the end of the line you

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123