This file shows how to use SpyJ 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.spyj.SpyJA as the applet class and spyj20.zip 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.spyj.SpyJA.class" archive=spyj20.zip width=100 height=50>
<param name=Target value="com.spyj.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 spyj20.zip to the system's classpath.