What steps must be performed to get a applet which can work with File?
I have an applet with a function which returns a List of all Netdrives if this function is called by javascript.
Currently I get a permission denied exception. Google told me: I have to sign it and create a policy file. But I am not getting forward.
Could you tell me the steps, how to get this working?
G开发者_如何学Creetings and thanks!
You need to sign the applet, before it gets permission to access files: See http://java.sun.com/developer/onlineTraining/Programming/JDCBook/signed.html
or this (newer): http://www.entrust.net/ssl-resources/pdf/ECS_Java_Code_Signing_Guide.pdf
I have an applet with a function which returns a List of all Netdrives if this function is called by javascript.
Currently I get a permission denied exception. Google told me: I have to sign it..
Correct.
..and create a policy file. ..
Redundant if the signed applet code is accepted by the end user when prompted.
But I am not getting forward.
The missing ingredient is that you probably need to wrap those calls in an AccessController.doPrivileged(PrivilegedAction). This is caused by the interaction with JS.
精彩评论