Debugging a Java applet

When debugging an applet, you must begin by debugging the sun.applet.AppletViewer class. After you have begun debugging this class, you can open the source for any class which is part of your applet and set breakpoints.

You can start to debug an applet by following these steps:

  1. Issue the following command on your local system:

    idebug -qlang=java sun.applet.AppletViewer <applet_location>

    Where <applet_location> is one of the following:

  2. Click OK.
  3. If you are using JDK 1.1.x or JDK 1.2.2 prior to service release 9:
  4. If you are using JDK 1.2.2 service release 9+ or JDK 1.3:
  5. Set your breakpoint and run.

We recommend that you set a breakpoint on the init() or start() methods since these are the first methods that are called by the applet viewer.

Once you have set this breakpoint you can debug your applet as you would debug a Java application.

ngrelr.gif (548 bytes)
idebug command