The Java™ appletviewer tool allows you to run applets without a web browser. It is compatible with the appletviewer tool that is supplied by Sun Microsystems, Inc.
To run the appletviewer tool, you need to use Native Abstract Window Toolkit (NAWT), and use either the sun.applet.AppletViewer class or run the appletviewer tool in the Qshell Interpreter.
The following is an example of using the sun.applet.AppletViewer class and running the TicTacToe demo example. For information about how to load the demo examples, see How to extract sample files.
From the command line, enter:
cd '/home/MyUserID/demo/applets/TicTacToe'
For JDK 1.3, issue the command:
JAVA CLASS(sun.applet.AppletViewer) PARM('example1.html') PROP((os400.class.path.rawt 2)(java.version 1.3))
For JDK 1.4, issue the command:
JAVA CLASS(sun.applet.AppletViewer) PARM('example1.html') prop((os400.awt.native true)(java.version 1.4))
For JDK 1.5, issue the command:
JAVA CLASS(sun.applet.AppletViewer) PARM('example1.html') prop((os400.awt.native true)(java.version 1.5))
The following is an example of using the appletviewer tool in the Qshell Interpreter and running the TicTacToe demo example. For information about how to load the demo examples, see How to extract sample files.
The corresponding commands would be:
cd /home/MyUserID/demo/applets/TicTacToe
For JDK 1.3, issue the command:
Appletviewer -J-Dos400.class.path.rawt=2 -J-Djava.version=1.3 example1.html
For JDK 1.4, issue the command:
Appletviewer -J-Dos400.awt.native=true -J-Djava.version=1.4 example1.html
For JDK 1.5, issue the command:
Appletviewer -J-Dos400.awt.native=true -J-Djava.version=1.5 example1.html
For more information about the appletviewer tool, see the appletviewer tool by Sun Microsystems, Inc.