• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
  • Himai Minh
  • Carey Brown
  • salvin francis


Ranch Hand
Posts: 133
  • 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
Posts: 43016
  • 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.
Posts: 3955
  • 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 found some pretty shells, some sea glass and this lovely tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic