PRB: Security Exception When Launching an Applet with Images
ID: Q169815
|
The information in this article applies to:
-
Microsoft virtual machine
SYMPTOMS
When trying to launch a Java Applet with animation support from outside the
DevStudio environment, the applet fails to launch properly and the Java log
shows the following AppletSecurityException error:
*** Security Exception: Couldn't connect to with origin from file
****com.ms.applet.AppletSecurity.checkConnect at
com/ms/applet/BrowserAppletFrame.getImageFromHash at
com/ms/applet/BrowserAppletContext.getImage at
java/applet/Applet.getImage...
RESOLUTION
To work around the problem, you can use either of the following methods:
- Use a build of the Microsoft Java VM newer than 1516. You can find a
newer build at http://www.msdn.microsoft.com/
-or-
- You can load the applet from a Web server, since it will not be a file
URL and is allowed to connect to the host from which it was loaded.
NOTE: the image files need to also exist on the server in the same or
subordinate folder of the applet.
-or-
- You can run the applet from DevStudio, which relaxes the security
restrictions imposed on an applet. Essentially, placing the class files
of the applet in the system classpath
-or-
- You can place the applet in a signed CAB file, again to relax the
security restrictions imposed on an applet.
MORE INFORMATION
This problem happens only under the Microsoft VM build 1516, when loading
the applet via a file URL.
Steps to Reproduce Behavior
- Install the Microsoft Java VM build 1516.
- Create a default Applet Wizard applet, with animation support.
- Launch Internet Explorer outside of Developer Studio by clicking on the
project's HTML page.
The applet will fail to load properly, and you will get the above
exception.
REFERENCES
For more information on Cab&Sign, please refer to the Sample CabAndSign
that comes with the Visual J++.
For additional information on the current release of the VM, please refer
to the following Knowledge Base article:
Q163637 INFO: Availability of Current Build of Microsoft VM for Java
For the latest Knowledge Base articles and other support information on
Visual J++ and the SDK for Java, see the following page on the Microsoft
Technical Support site:
http://support.microsoft.com/support/visualj/
http://support.microsoft.com/support/java/
Additional query words:
Keywords : kberrmsg kbnokeyword kbVJ JVM
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbprb