Permission Not Being Granted
Hi,
I'm new in java security. I'm trying to grant "java.security.AllPermission" to my program but getting AccessControlException. Here is the program:
package t;
public class MyApp {
public static void main(String[] arg) throws Exception{
FileWriter writer = new FileWriter( new File("c:/a.txt") );
writer.write("HELLLO");
writer.flush();
writer.close();
}
}
Here is my policy file:
grant codeBase "file:/home:/t/*" {
permission java.security.AllPermission;
permission java.security.SecurityPermission "getPolicy";
};
here is the command line:
java -Djava.security.manager -Djava.security.policy=file:/c:/t/my.policy t.MyApp
Any solution.
thx

