This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AccessControlException

 
sree visu
Ranch Hand
Posts: 133
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I tried to read the documentation given by sun but it said that we must configure the java.policy file.

Could anyone say where to configure it and where is that available.
Also please do give me an example of how to do it for a particular applet that is handling it

it gives the following exception



please do say me how to add the permission to my local machine the particular java.policy file and where to add it[/CODE]

Thanks for your reply in advance
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HowCanAnAppletReadFilesOnTheLocalFileSystem page talks about that. It also mentions signing the applet, which is an alternative to changing the security policy.
 
Norm Radder
Ranch Hand
Posts: 707
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a bit of my .java.policy file.There is a Sun program: policytool that provides a GUI to update it. Sometimes it doesn't work, so I often update it with an editor. On my Windows XP, the file is in C:\Documents and Settings


grant codeBase "File:/D:/JavaDevelopment/Testing/-" {
permission java.io.FilePermission "<<ALL FILES>>", "read,write,execute";
permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www.protocol.file";
permission java.lang.RuntimePermission "setFactory";
};
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic