On Nov 22, 8:54 pm, Arne Vajh?j<a...@vajhoej.dk> wrote:
On 22-11-2010 06:19, Gijo mathew wrote:
I am developing an applet. For security purpose java's
AccessController added, but the run function is not calling. Do i have
to use any other packages.
Code is like this
AccessController.doPrivileged(new PrivilegedAction() {
public Object run()
{
System.out.println("0000000000000000");
return "zzzzzz"; // nothing to return
}
});
pls tell me whether this is the correct usage.
It looks fine to me.
How do you determine that run is not being called?
Thanks for the reply. By using signed applet it is executing
But iam getting an error while running my applet
Caught exception in privileged block,
Exception:java.security.AccessControlException: access denied
(java.io.FilePermission<<ALL FILES>> execute)
my policy file is
grant signedBy "company" {
permission java.io.FilePermission "/home/gg/text.txt", "read";
};
if i change the policy like this
grant {
permission java.io.FilePermission<<ALL FILES>> "execute";
};
it is working fine
I just want to give permission to a particular file by checking the
alias
problem.