• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

AccessControlException!!!

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm writing a Picture Viewer applet to be used on the web.
It works fine when i first extended as a Frame, but when i incorporate it into an applet, it gives me AccessControlException.
here is the code that gives me problem:
/*i'm retriving all picture files from the pathName through the PictureFileFilter that implements the FilenameFilter and store into a listFile using the File.listFiles() method.*/

File myDIR = new File(pathName);
File[] listFiles = myDIR.listFiles(new PictureFileFilter());
-i've tried to use URL instead of getting the string of the path to post the image onto the JLabel, but that didn't help.
-i know it's a security issue with the applet security manager, but is there a way to get around it?
the following is my exception:
java.security.AccessControlException: access denied (java.io.FilePermission \pictures read);
-is there a way to change the filepermission of the security?
thank you all for reading this post.
any help would be greatly appreciated.
kj
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic