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