Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

using .java.policy files

Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently trying to set permissions for applets hosted on my server to read from a log file on my machine. Both the applet and the text file share the same directory. The applet can read the file when I call it in the appletviewer but not in the html file. I have been trying to understand the lengthy documentation on policy tool from the Sun site. However, I still cannot get my applets to recognise that I have created a policy file allowing them read access to the text file. I saved the policy file in C:\jdk1.3.1\jre\lib\java.policy and another version in C:\
Can anyone advise me as to where I am going wrong with this and how to correct the problem?
Many Thanks,
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your .java.policy file needs to be located in your home directory (usually C:\WINNT\Profiles\%username% on NT and C:\Windows on 95/98).
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The policy file is usualy located at
C:\Program Files\JavaSoft\JRE
Here look for what all JRE's u have.
In my case i have 2 JRE's
JRE1.2 and JRE1.3.1.
So go for the higher JRE ie JRE1.3.1 ie located at
C:\Program Files\JavaSoft\JRE\1.3.1\lib\security. U will find the policy file there. Change it to grant permissions
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic