aspose file tools*
The moose likes Applets and the fly likes using .java.policy files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "using .java.policy files" Watch "using .java.policy files" New topic
Author

using .java.policy files

Charlie Flynn
Greenhorn

Joined: Jul 11, 2001
Posts: 8
Hello,
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,
Charlie
Jeremy Hooie
Ranch Hand

Joined: Aug 22, 2001
Posts: 38
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).
Sajee Joseph
Ranch Hand

Joined: Jan 17, 2001
Posts: 200
Hi,
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using .java.policy files