Chapter 7

Troubleshooting Java Plug-in

This chapter describes some issues that can arise with the Java Plug-in technology and suggests causes and workarounds.

7.1 Java Plug-in

The following issues might arise with Java Plug-in:

Issue: Internet Explorer browser hangs when a frame containing a while loop in its constructor is about to be created.

Cause: The code path for pumping messages to the browser is different for a modal and a non-modal dialog. In this particular case, the frame (though non-modal) behaves as a modal for some time after it enters into a while loop.

Workaround: Replace the frame with a modal dialog.

Issue: Browser hangs in an applet.

Cause: Determine the cause as follows:

  • Add -verbose in the Java Control Panel.

  • Restart the browser and run the applet again. When the applet is loaded, a dos box appears on the screen.

  • Press Ctrl-\ or Ctrl-Break to get the stack trace when the applet gets hung.

Workaround: None

Issue: Rendering artifacts/flickering issue while scrolling an applet in a browser (Internet Explorer).

Workaround: Set the property sun.awt.noerasebackground=true in the Java control panel and restart the browser.