I want to execute a jar file with using policy file from my project. my policy file is:
*grant codeBase "file:///D:/xx/yy/zz/-"{
permission java.io.FilePermission
"D:/aa/bb/test.jar", "read, write, delete, execute";
};*
my project is under D:/xx/yy/zz/ folder and i want to execute test.jar in this project but i had an error:
access denied (java.io.FilePermission <> execute)
if i change policy file like this, that is ok:
*grant codeBase "file:///D:/xx/yy/zz/-"{
permission java.io.FilePermission
"<<ALL FILES>>", "read, write, delete, execute";
};*
But i do not want to give all permission to my project.
And also in project i set policy file like this:
String path="D:\aa\bb\test.jar";
System.setProperty("java.security.policy","C:\\policy\\"+"test.policy");
System.setSecurityManager(new SecurityManager());
Is there any body to say something about this situation ? Thanks...