    Contents    Previous    Next

#### Writing an Applet

# Testing an Applet

To test an applet, you need to compile it, add it to an HTML page, and view the page in HotJava. These are steps 3, 4, and 5 of writing an applet.

Since no Java debugger exists yet, status strings are important debugging tools. The rough equivalent of `printf()` is

        System.out.println("...");

which prints the specified string to the standard output. (Here are the platform-specific details.)

To get input -- so you can vary values used in your applet without recompiling -- you can use attributes.

To load recompiled code or read changed attribute values, press the reload button (the far right button at the bottom of the HotJava window) or choose the Reload item from the File menu.

Important: Do NOT invoke hotjava from the classes directory. Due to a bug, HotJava can't reload an applet when you invoke hotjava from the same directory that the applet's compiled code is in.

    Contents    Previous    Next