This file shows how to use JavaSpy for debugging applets. 

This was tested with appletviewer from JDK 1.2 and Internet Explorer 5.0

1. In the HTML file, which invokes the applet, specify com.javaspy.JavaSpyA as the applet class and javaspy.jar as the archive name. The "Target" should contain the name of your applet class. Other parameters will be passed to your applet. For example, file TestApplet.html contains the following lines:

<applet code="com.javaspy.JavaSpyA.class" archive=javaspy.jar width=100 height=50>
<param name=Target value="com.javaspy.DemoApplet">
<param name=Param1 value="Value1">
<param name=Param2 value="Value2">
</applet>

2. To run in the appletviewer it is necessary to create a policy file with all permissions. For example, file SecurityPolicy.txt includes:

grant {
permission java.security.AllPermission;
};

3. Run the appletviewer:

appletviewer -J-Djava.security.policy=SecurityPolicy.txt TestApplet.html

4. To run in the Internet Explorer it is necessary to add javaspy.jar to the system's classpath.