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:
where filename is the name of the HTML file.appletviewer $HOME/<filename>.html
On Windows systems, type at a shell or command prompt:
where <demo> is the full path into which you extracted the compressed demo package.appletviewer <demo>\GraphLayout\example1.html
- To start the Applet Viewer on a web page, type at a shell or command prompt:
The Applet Viewer does not recognize the charset option of theappletviewer http://mywebpage.com/demo/applets/MyApplet/example1.html
<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 theappletviewer
command.For example:> cd demo\applets\TicTacToe ..\..\..\bin\appletviewer -debug example1.html