List of usage examples for java.lang SecurityManager checkPrintJobAccess
public void checkPrintJobAccess()
SecurityException
if the calling thread is not allowed to initiate a print job request. From source file:Main.java
public static void main(String[] args) { System.setProperty("java.security.policy", "file:/C:/java.policy"); SecurityManager sm = new Main(); System.setSecurityManager(sm); sm.checkPrintJobAccess(); System.out.println("Allowed!"); }