PRB: Cannot Use JDBC in Applets Outside of Visual J++'s IDEID: Q179001
|
When programming an Applet that uses JDBC, everything works in the development environment. When the Applet is run outside of the development environment, the Applet throws a com.ms.security.SecurityExceptionEx.
JDBC requires access to resources that are available only when outside the set of security restrictions placed on non-trusted Java Applets, also known as the "sandbox." Regular Applets cannot access files on the client's hard drive, access other network sockets, or print. JDBC requires file input/output. When trying to access a file on the client, the SecurityExceptionEx is thrown.
In order for the Applet to work properly, you will need to create a cabinet file and digitally sign it (see references for more information). Then you need to add certain method calls in the Applet to "assert permissions" (please see article reference below) for file input/output.
This behavior is by design.
For additional information on making your Java Code trusted in Microsoft Internet Explorer and other information, please see the following articles in the Microsoft Knowledge Base:
Q193877 HOWTO: Make Your Java Code Trusted in Internet ExplorerFor the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site:
Q175622 PRB: SecurityExceptionEx Exception Running a Java Applet
http://support.microsoft.com/support/visualj/
http://support.microsoft.com/support/java/
Additional query words:
Keywords : kbSDKJava300 kbSDKJava310 JDB kbSDKJava320
Version : WINDOWS:1.0,1.1,2.0,2.01,2.02,3.0,3.1,3.2
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 13, 1999