Java System .setSecurityManager ( SecurityManager s)
Syntax
System.setSecurityManager(SecurityManager s) has the following syntax.
public static void setSecurityManager(SecurityManager s)
Example
In the following code shows how to use System.setSecurityManager(SecurityManager s) method.
//from w ww. j a v a 2s . c o m
public class Main {
public static void main(String[] args) throws Exception {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new SecurityManager());
}
}
}