private static void addCommonPermissions(Permissions permissions){
  permissions.add(new AudioPermission("play"));
  permissions.add(new AWTPermission("listenToAllAWTEvents"));
  permissions.add(new AWTPermission("setWindowAlwaysOnTop"));
  permissions.add(new AWTPermission("watchMousePointer"));
  permissions.add(new LoggingPermission("control",""));
  permissions.add(new SocketPermission("*","connect, listen, accept, resolve"));
  permissions.add(new URLPermission("http://-","*:*"));
  permissions.add(new URLPermission("https://-","*:*"));
  permissions.add(new RuntimePermission("accessClassInPackage.sun.*"));
  permissions.add(new RuntimePermission("accessDeclaredMembers"));
  permissions.add(new RuntimePermission("getenv.*"));
  permissions.add(new RuntimePermission("getFileSystemAttributes"));
  permissions.add(new RuntimePermission("readFileDescriptor"));
  permissions.add(new RuntimePermission("writeFileDescriptor"));
  permissions.add(new RuntimePermission("queuePrintJob"));
}

private static void addCommonPermissions ( Permissions permissions ) { permissions . add ( new AudioPermission ( "play" ) ) ; permissions . add ( new AWTPermission ( "listenToAllAWTEvents" ) ) ; permissions . add ( new AWTPermission ( "setWindowAlwaysOnTop" ) ) ; permissions . add ( new AWTPermission ( "watchMousePointer" ) ) ; permissions . add ( new LoggingPermission ( "control" , "" ) ) ; permissions . add ( new SocketPermission ( "*" , "connect, listen, accept, resolve" ) ) ; permissions . add ( new URLPermission ( "http://-" , "*:*" ) ) ; permissions . add ( new URLPermission ( "https://-" , "*:*" ) ) ; permissions . add ( new RuntimePermission ( "accessClassInPackage.sun.*" ) ) ; permissions . add ( new RuntimePermission ( "accessDeclaredMembers" ) ) ; permissions . add ( new RuntimePermission ( "getenv.*" ) ) ; permissions . add ( new RuntimePermission ( "getFileSystemAttributes" ) ) ; permissions . add ( new RuntimePermission ( "readFileDescriptor" ) ) ; permissions . add ( new RuntimePermission ( "writeFileDescriptor" ) ) ; permissions . add ( new RuntimePermission ( "queuePrintJob" ) ) ; }
adds a couple of common permissions for both unsigned extensions as well as groovy scripts .
