applets and files

Hello!

I have built an applet which have to write, read, delete some files. I have write the permissions in the java policy file and I have no problem to run the applet with appletviewer. However, when I try to run it with the web browser the applet write the files but then it doesn't find them when the applet needs to read the files. I have been reading and I think I have to change my initial folder in the java console but I`m not sure about how I have to do it.

Thank you in antitipation for your help.

[529 byte] By [toy_perdioa] at [2007-10-3 4:26:22]
# 1
One question:I have the same taht you , but my applet doesn磘 write anything.where do you place the .java.policy?do you mind to post me or write this file?Thanks.
juanjocasaa at 2007-7-14 22:29:01 > top of Java-index,Desktop,Core GUI APIs...
# 2

You can find the java policy file in your Java folder Java/JRE/1.4.1/lib/security/java.policy.

You have to open java.policy with the notepad and add the permissions you need and save the file. For example, if you want to allow your applet to read, write and delete files you have to add this lines to the java.policy file.

grant {

permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";

permission };

Anyway, google java applet permissions and you will find web pages where you can learn to use grant.

toy_perdioa at 2007-7-14 22:29:01 > top of Java-index,Desktop,Core GUI APIs...