Running and debugging applets with the Applet Viewer (AIX, Linux, and Windows only)

Use the following commands to run and debug an applet with the Applet Viewer.

Procedure

  • To run an applet with the Applet Viewer, enter the following command: appletviewer <name>, where <name> is one of the following options:
    • The file name of an HTML file that calls an applet
    • The URL of a web page that calls an applet
    For example, to start the Applet Viewer on an HTML file that calls an applet:
    On AIX® and Linux® systems, type at a shell prompt:
    appletviewer $HOME/<filename>.html
    where filename is the name of the HTML file.
    On Windows systems, type at a shell or command prompt:
    appletviewer <demo>\GraphLayout\example1.html
    where <demo> is the full path into which you extracted the compressed demo package.
  • To start the Applet Viewer on a web page, type at a shell or command prompt:
    appletviewer http://mywebpage.com/demo/applets/MyApplet/example1.html
    The Applet Viewer does not recognize the charset option of the <META> tag. If the file that the Applet Viewer loads is not encoded as the system default, an I/O exception might occur. To avoid the exception, use the -encoding option when you run appletviewer. For example:
    appletviewer -encoding JISAutoDetect sample.html
  • To debug an applet with the Applet Viewer, use the debug parameter with the appletviewer command.
    For example:
    >
    cd demo\applets\TicTacToe
    ..\..\..\bin\appletviewer -debug example1.html