# Re: JDK1.1.3 applet security exception

Roland Schemers (Roland.Schemers@Eng)
Thu, 21 Aug 1997 18:27:57 -0700 (PDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Marianne Mueller: "Re: JDK1.1.3 applet security exception"
- Previous message: steven.j.blumfield: "JDK1.1.3 applet security exception"
- Maybe in reply to: steven.j.blumfield: "JDK1.1.3 applet security exception"
- Next in thread: Marianne Mueller: "Re: JDK1.1.3 applet security exception"

    Date: Thu, 21 Aug 1997 18:27:57 -0700 (PDT)

    From: Roland Schemers <Roland.Schemers@Eng>

    Subject: Re: JDK1.1.3 applet security exception

    To: mrm@Eng, steven.j.blumfield@ac.com

Applets are not allowed to access classes in the sun.* package, so your
statement:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Will fail when run from an applet, hence the checkPackageAccess exception.
I am not familiar enough with jdbc to know the correct way to invoke it
from an applet.

roland

> Hi again,
>
> I sent an email to you about a JDK1.1.2 security exception on 30 June. I
never
> received a response. I retried exec of this very basic applet with JDK1.1.3
> yesterday and am getting a similar result. Please respond ASAP - the
> attachments should not take more than a few minutes to check out!
>
> I developed an applet that includes connection to and access from an MS Access
> DB on my local workstation. It didn't work. To test this further, I created
a
> simple applet "HelloAuto" (based on a sample from book "Learn Java Now") - see
> attached. The offending line is:
>
> // load the jdbc-odbc driver
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>
> Compiling: "javac HelloAuto.java <Enter>" works OK.
>
> Exec: Appletviewer HelloAuto.html <Enter> produces the following in the
> DOS window.
>
> Before try loop in init()
> sun.applet.AppletSecurityException: checkpackageaccess
> at
> sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:628)
> at
> sun.applet.AppletClassLoader.LoadClass(AppletClassLoader.java:187)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> at HelloAuto.init(HelloAuto.java:56)
> at sun.applet.AppletPanel.run(AppletPanel.java:287)
> at java.lang.Thread.run(Thread.java:474)
> sun.applet.AppletSecurityException: checkpackageaccess
> at
> sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:628)
> at
> sun.applet.AppletClassLoader.LoadClass(AppletClassLoader.java:187)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
> at HelloAuto.init(HelloAuto.java:56)
> at sun.applet.AppletPanel.run(AppletPanel.java:287)
> at java.lang.Thread.run(Thread.java:474)
> Failed:sun.applet.AppletSecurityException: checkpackageaccess
>
>
> I would appreciate your feedback on this.
>
>
>
> Thanks and Regards,
> Steve
>

- Next message: Marianne Mueller: "Re: JDK1.1.3 applet security exception"
- Previous message: steven.j.blumfield: "JDK1.1.3 applet security exception"
- Maybe in reply to: steven.j.blumfield: "JDK1.1.3 applet security exception"
- Next in thread: Marianne Mueller: "Re: JDK1.1.3 applet security exception"