Mar 14
|
If you have code that needs to perform a privileged operation (eg. an applet accessing the local disk) then it needs to be done from trusted code. You can make code trusted by making the call from a privileged block as shown in the following example.
AccessController.doPrivileged(new PrivilegedAction() { public Object run() { // add your privileged code here return null; } });