title: Configuring java policy file with Wildfly 8.1
body: <p>When running my application in wildfly 8.1, I'm getting an AccessControlException:</p>
  
  <pre><code>Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "uka.karmi.useDistributedThreads" "read")
  at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457 [rt.jar:1.8.0_05]
  at java.security.AccessController.checkPermission(AccessController.java:884) [rt.jar:1.8.0_05]
  at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) [rt.jar:1.8.0_05]
  at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294) [rt.jar:1.8.0_05]
  at java.lang.System.getProperty(System.java:714) [rt.jar:1.8.0_05]
  </code></pre>
  
  <p>I'm running my wildfly server with VM argument:</p>
  
  <pre><code>-Djava.security.policy=/opt/misc/test.policy
  </code></pre>
  
  <p>Where test.policy looks like:</p>
  
  <pre><code>grant {
      permission java.security.AllPermission;
  };
  </code></pre>
  
  <p>I also tried modifying test.policy:</p>
  
  <pre><code>grant {
      permission java.security.AllPermission;
      permission java.util.PropertyPermission "uka.karmi.useDistributedThreads", "read";
  };
  </code></pre>
  
  <p>but still get the same error.</p>