Signed Applet Upgraded From .cab to .jar File Throws a Security Exception When Run in Microsoft Virtual Machine (VM)


Symptoms

After you upgrade a signed applet from .cab to .jar files, the applet no longer works in the Microsoft VM. The applet runs without any error in the Sun Java Runtime Environment (JRE) implementation.

Cause

Microsoft VM does not support signed .jar files. Microsoft VM supports unsigned .jar files through the archive attribute of the <APPLET> tag. However Microsoft VM treats classes and resources within the signed .jar files as untrusted.

As a result, the applet is treated as untrusted by the Microsoft VM. Any action which the applet performs ,that requires access outside the applet sandbox, results in a security exception.

Resolution

The only applet signing scheme recognized by the Microsoft VM is Authenticode technology which is used with the .cab files.

Specify the upgraded .jar files through the archive attribute for the Sun JRE, and continue to specify the .cab files through cabbase for the Microsoft VM. For example, assume that you have the following code:

<APPLET code="MyApplet" width=100 height=100>
<PARAM name="cabbase" value="package1.cab, package2.cab">
</APPLET>

Change the above code as shown in the following code:

<APPLET code="MyApplet" archive="package1.jar, package2.jar"
width=100 height=100>
<PARAM name="cabbase" value="package1.cab, package2.cab">
</APPLET>

Related Information

None.


Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.