Debugging Tips

This chapter provides debugging tips for some of the problems that you might encounter while trying to run an applet.

Create a Stable Environment

When you are experiencing problems with an applet, the first thing that you should do is create a stable environment. For our tools for Java, we recommend that you use the Java plug-in or Appletviewer (both are available from JavaSoft). You can download the Java plug-in from the JavaSoft site at java.sun.com/products/plugin.
Once you install the Java plug-in or Appletviewer, run the applet that is not functioning properly. If it behaves as expected in this environment, the problem most likely is caused by an incompatibility with the applet and your browser. If the applet still does not function, check the exceptions and messages that are returned, and then look for more information in the remainder of this guide.
If you are running the Java plug-in, you might need to turn on the Java console:
  1. Close your Web browser.
  2. Select Java Plug-In ControlPanel from your Programs list.
  3. Select Show Java Console from the Properties window.
  4. Click Apply.
The next time you run an applet, the Java console appears. In addition to reviewing the information provided here, you should also review the information provided in the FAQ for the plug-in at java.sun.com/products/plugin/plugin.faq.html.

Turn On Logging When Using the Tunnel Feature

The tunnel feature includes a logging mechanism that is an excellent debugging tool. If you are having problems running tunneled applets, add LOG=filename to the configuration file for the tunnel feature to turn logging on.
Note: This file can get large. Be sure to periodically delete or move the contents of this file.

Verify Installation and System Requirements

Review the instructions (especially the sections on testing your installation) provided in the readme.txt files. You might also want to verify your directory structure by referring to the information in the archive.txt or package.txt files.
If the applet is installed correctly, verify that your environment meets the requirements for that applet or driver. View the requirements of the appropriate Java tool now: