I'm trying to comunicate with a JNI service in the serverpart of my GWT application. The problem is that I'm getting a
'java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.HelloWorld)'
Error. I ´Google for开发者_如何学运维 the java Security and Permissions model and found a description on http://java.sun.com/developer/onlineTraining/Programming/JDCBook/appA.html
I tried to add the
grant { permission java.security.AllPermission; };
to my \workspace.......\war\WEB-INF\deploy.......\rpcPolicyManifest\manifest.txt but that wasnt the policy manifest file...
In which file do I add premissions or how do I tell at compiletime what premissions he uses.
Regards, Stefan
I found the solution (well part of it)
To run code which needs extra premissions you have to use AccessController.doPrivileged(...)
See: http://download.oracle.com/javase/1.4.2/docs/api/java/security/AccessController.html
精彩评论