HOWTO: Relaxing Visual J++ Security Restrictions on Java Applets

Last reviewed: January 29, 1998
Article ID: Q177750
The information in this article applies to:
  • SDK for Java, version 2.0, 2.01
  • Microsoft Visual J++, versions 1.0, 1.1

SUMMARY

How does the Msdev.exe, in Visual J++, relax the security in Internet Explorer so that my applet can run outside the Java sandbox, despite the fact that it is not in a signed .cab file?

MORE INFORMATION

In the Microsoft Virtual Machine for Java, which is included with Internet Explorer 3.x, 4.0, and 4.01 only trusted class files can access resources outside the Java sandbox. Class files from digitally signed .cab files are trusted. If the HTML file is run from Microsoft Developer Studio, the class files are also trusted. This can be very helpful during applet development. However, to deliver your applet to other users, you must place them in a signed .cab file.

When executing or debugging a Java Applet from Developer Studio, the security restrictions in Internet Explorer are relaxed for quick and easy testing. MSDEV prepends the project path to the CLASSPATH that is used by Internet Explorer. This gives the classes trusted status.

Applets outside of MSDEV must be cabbed and signed in order to run in Internet Explorer without the sandbox restrictions. One of the references below is an FAQ about cabbing and signing.

Note that for all trusted applets (including those running under Developer Studio) running under the Virtual Machine for Java (version 2252 or higher) included with either the SDK 2.0 for Java or Internet Explorer 4.0 have additional restrictions (please see references below).

REFERENCES

For more information on CAB signing, please see the SDK for Java 2.0 documentation and the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q168941
   TITLE     : INFO: Frequently Asked Questions for CAB Files

For more information on additional security restrictions for the Virtual Machine for Java (version 2252 or higher) included with either the SDK 2.0 for Java or Internet Explorer 4.0, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q175622
   TITLE     : PRB: SecurityExceptionEx Exception Running a Java Applet

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/

Keywords          : JVM
Technology        : internet kbDSupport
Version           : WINDOWS:1.0,1.1,2.0
Platform          : WINDOWS
Issue type        : kbhowto


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 29, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.