Using files

Hello,

I use new FileWriter("save.txt") to write to a new file.

Working with JBuilder it was fine.

Now I change the environment to dos os, using appletviewer, and for some reason, I get exception on this command, and the exception is:

Error -- java.security.AccessControlException: access denied (java.io.FilePermission) save.txt write

How can I fix it ?

Thanks, Guy.

[410 byte] By [guyw77] at [2007-9-27 17:24:40]
# 1

The reason is, I *think* applets can't write files to your harddrive, because if it were in a browser, you could write whatever you wanted to the harddrive, so it is a security measure. If it is on a website, you could create a login, and write it to the server's harddrive under their profile.

CoolMoDee

CoolMoDee at 2007-7-6 12:23:03 > top of Java-index,Other Topics,Java Game Development...