Java tutorial
import java.util.PropertyPermission; public class Main { public static void main(String[] args) { PropertyPermission permission = new PropertyPermission("java.home.usr", "read"); if (permission.equals(new PropertyPermission("java.home.usr", "read"))) { System.out.println("Has permissions on " + "java.home.usr" + " for read"); } if (permission.equals(new PropertyPermission("java.home.usr", "write"))) { System.out.println("Has permissions on " + "java.home.usr" + " for write"); } } }