I was wondering if anybody can show me way to be able to create read file permissions for my java applet.
The exact exception I receive is
java.security.AccessControlException: access denied(java.io.FilePermission filename.pdf write)
I've put f.setReadable
and f.setWriteable
where f
is the file and nothing. A little help please.
There's security limits on what an unsigned applet can do, and one of the things it can't do is access the local filesystem (see here for a full list). You have several options:
FileOpenService
and FileSaveService
to ask the user to let you read/write one particular file. Alternatively, you can use the PersistenceService
to store a small amount of data persistently within the browser.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.