Java security policy permissions

Java desktop application policy permissions for enterprise users.

Example policy file

The following grant syntax demonstrates the required security permissions. You can adapt this example for inclusion in your policy file.

grant codeBase "file:C:/Program Files/zipcreator/*" {
  permission java.awt.AWTPermission "createRobot"; // Optional
  permission java.awt.AWTPermission "readDisplayPixels"; // Optional
  permission java.awt.AWTPermission "accessClipboard"; // Optional
  permission java.awt.AWTPermission "showWindowWithoutWarningBanner";
  permission java.awt.AWTPermission "replaceKeyboardFocusManager"; 

  permission java.util.PropertyPermission "os.name", "read"; 
  permission java.util.PropertyPermission "user.dir", "read";
  permission java.util.PropertyPermission "user.home", "read";
  permission java.util.PropertyPermission "java.io.tmpdir", "read"; 

  permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete";

  // Alternatively, for specific directory access control 
  // permission java.io.FilePermission "${user.home}${/}-", "read, write"; 
  // permission java.io.FilePermission "${java.io.tmpdir}${/}-", "read, write, delete"; 
  // And for each drive or directory
  // permission java.io.FilePermission "path${/}", "read, write"; 
  // permission java.io.FilePermission "path${/}-", "read, write, delete";
};

Next: Troubleshooting