need help with file policy

when i try to run an applet whice write to a file i get:

access denied:(java.io.filepermission Highscore write)

my java.security file is this:

# The default is to have a single system-wide policy file,

# and a policy file in the user's home directory.

policy.url.1=file:/E:/jdk1.3/jre/lib/security/java

policy.url.2=file:/C:/Windows/java#

my java.policy file is:

grant codeBase "file:/c:/pong/ext/*"{

permission java.security.AllPermission;

};

i have another policy file like it write in url 1

my highscore file is in the pong dir

plus when i open my policytool i get this message:

could not find policy file:c:\windows\java.policy

but i have this file in that path

i stack with this problem for the over 3 day

i think my policy file is ok so the security file

so why i keep get those message?

if you have answer you can even send it to me by email

yossihaim@barak-online.net

[1027 byte] By [yohaim] at [2007-9-26 10:30:54]
# 1
I do believe the name of the policy file is .java.policy and not just java.policy There is a . before java also.
dewangs at 2007-7-1 22:50:25 > top of Java-index,Archived Forums,Java Programming...
# 2
in the docs the java file is java.policy not .java.policywher i put the .can you send me code?
yohaim at 2007-7-1 22:50:25 > top of Java-index,Archived Forums,Java Programming...
# 3

i add . to my java now i dont get the message: could not find policy file but i get the error :

java.security.AccessControlException: access denied (java.io.FilePermission Highscore write)

the policy file is:

grant codeBase "file:/c:/pong/ext/*"{

permission java.security.AllPermission;

};

my highscore.txt file is in the pong dir

so what the problem?

yohaim at 2007-7-1 22:50:25 > top of Java-index,Archived Forums,Java Programming...
# 4

> i add . to my java now i dont get the message: could

> not find policy file but i get the error :

> java.security.AccessControlException: access denied

> (java.io.FilePermission Highscore write)

> the policy file is:

> grant codeBase "file:/c:/pong/ext/*"{

> permission java.security.AllPermission;

> };

> my highscore.txt file is in the pong dir

> so what the problem?

Is your file in c:/pong or c:/pong/ext? You have given rights for pong/ext. That does not imply rights for the parent directory.

dewangs at 2007-7-1 22:50:25 > top of Java-index,Archived Forums,Java Programming...