Is it possible to read / write a file from the applet

I try to read and write a file from the applet, so if I run the applet from my appletviewer, then I can read / write the file, but when I try to do this from my browser, I get an exception protection. Any idea how to do this?

+4
source share
3 answers

Is it possible to read / write a file from the applet

Yes, but you need to sign the applet and get permission from the user.

Some useful links:

+5
source

JWS application with a sandbox. can read and write files on the local file system using the JNLP API services. Here is the diagram . JNLP API file services . The downloaded zip file contains the source file, the launch file, and the build script.

+1
source

in fact it is not so difficult. You can independently sign the applet, and then it will be able to read / write to / from the local file system outside the limitations of the isolated environment. see link below. it will show you how to sign the applet with keytool, and the example does read / write to the file system. no need to guess policies files, etc.

Please note that, as @aioobe noted, the user will be asked to accept the certificate.

0
source

All Articles