0

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?

Greetings and thanks!

Roman C
  • 49,761
  • 33
  • 66
  • 176
mythbu
  • 1

2 Answers2

0

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

Stephan
  • 4,395
  • 3
  • 26
  • 49
0

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.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433