TestAppletPlugin.html file shows how to use SpyJ for debugging applets using Java Plugin.
This was tested with Java Plugin 1.3.1 and Internet Explorer 5.0
1. In the HTML file, which invokes the applet, insert OBJECT tag as explained in Java Plugin documentation. Specify com.spyj.SpyJA as the applet class (parameter "code" of the plugin), spyj20.zip as the archive name (parameter "archive"). The "Target" parameter should contain the name of your applet class. Other parameters will be passed to your applet. For example, file TestAppletPlugin.html contains the following lines:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width=600 height=400 align="baseline" code="com.spyj.SpyJA.class" archive=spyj20.zip>
<PARAM NAME="code" VALUE="com.spyj.SpyJA.class">
<PARAM NAME="archive" VALUE="spyj20.zip">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<param name=Target value="com.spyj.DemoApplet">
<param name=text value="SpyJ applet">
No Java 2 SDK, Standard Edition v 1.3 support for applet
</OBJECT>
2. Since SpyJ needs to access Java event queue, files and properties, it
is necessary to give SpyJ all permissions. To enable this open java.policy file
under lib/security directory of the JRE and add lines:
grant codeBase "file:c:/spyj/spyj20.zip" {
permission java.security.AllPermission;
};
3. Add the directory with SpyJDll.dll to the system path.
4. Open Java Plugin control panel and enter Java Runtime Parameters:
-Xdebug -Xnoagent -Djava.compiler=NONE -XrunSpyJDll
5. Open the HTML file (TestAppletPlugin.html) in a browser. If the applet does not start, verify that SpyJDll is on the path or try to temporarily remove -XrunSpyJDll option. If the applet failed to start because of access control exception, make sure that the permissions are granted as explained above.