Java Security FAQ: Writing Files


Here's an applet that tries to write to the file /tmp/foo:

and here's the source.

If you add the line

	acl.write=/tmp
to your ~/.hotjava/properties file, then the appletviewer will be able to write to that directory. That is, the appletviewer will be able to create files in your /tmp directory.

If you add a file name specifically,

	acl.write=/tmp/foo
then the appletviewer will be allowed to create just that one file, but not other files in the /tmp directory.

Conclusion: Don't add files or directories to acl.write in ~/.hotjava/properties, if you don't want the appletviewer to allow applets to create files on your system.

Back to the Java Security FAQ