Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java.security.AccessControlException

Reply
Thread Tools

java.security.AccessControlException

 
 
Nancy.Nicole@gmail.com
Guest
Posts: n/a
 
      08-14-2006
I need to create an instance of a class that writes a file. I am
getting this exception:

basic: Stopping applet ...
basic: Removed progress listener:
sun.plugin.util.GrayBoxPainter@1157f77
basic: Finding information ...
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@170888e,
refcount=0
basic: Caching classloader: sun.plugin.ClassLoaderInfo@170888e
basic: Current classloader cache size: 1
basic: Done ...
basic: Joining applet thread ...
basic: Destroying applet ...
basic: Disposing applet ...
basic: Quiting applet ...
basic: Joined applet thread ...
basic: Unregistered modality listener
basic: Registered modality listener
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@170888e,
refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@a6faa9
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
java.security.AccessControlException: access denied
(java.io.FilePermission data.dat read)
at java.security.AccessControlContext.checkPermission (Unknown Source)
at java.security.AccessController.checkPermission(Unk nown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
at DataAccess.load(DataAccess.java:11)
at AddressBook32.<init>(AddressBook32.java:35)
at Z115.init(Z115.java:107)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Exception: java.security.AccessControlException: access denied
(java.io.FilePermission data.dat read)
java.security.AccessControlException: access denied
(java.io.FilePermission data.dat read)
at java.security.AccessControlContext.checkPermission (Unknown Source)
at java.security.AccessController.checkPermission(Unk nown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
at DataAccess.load(DataAccess.java:11)
at AddressBook32.<init>(AddressBook32.java:35)
at Z115.init(Z115.java:107)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
basic: Modality pushed
basic: Modality popped
Exception in thread "thread applet-Z115.class"
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Un known Source)
at sun.plugin.AppletViewer.showAppletException(Unknow n Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


I need to combat this exception. How do I do this?

Thanks.

 
Reply With Quote
 
 
 
 
Matt Humphrey
Guest
Posts: n/a
 
      08-14-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>I need to create an instance of a class that writes a file. I am
> getting this exception:
>
> basic: Stopping applet ...
> basic: Removed progress listener:
> sun.plugin.util.GrayBoxPainter@1157f77
> basic: Finding information ...


<snip exception top>

> basic: Starting applet ...
> java.security.AccessControlException: access denied
> (java.io.FilePermission data.dat read)
> at java.security.AccessControlContext.checkPermission (Unknown Source)


<snip exception remainder>

Applets (for very good reason) do not generally have permission to read or
write files on the user's machine. Typically you must sign the applet,
request the permission and the user must grant it or you must otherwise
persuade the user to modify the JVM security policy to allow file access.
For details on signing, try http://mindprod.com/jgloss/signedapplets.html

Matt Humphrey http://www.velocityreviews.com/forums/(E-Mail Removed) http://www.iviz.com/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments