List of usage examples for java.lang SecurityManager checkLink
public void checkLink(String lib)
SecurityException
if the calling thread is not allowed to dynamic link the library code specified by the string argument file. 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); sm.checkLink("JDBC"); System.out.println("Allowed!"); }