public static boolean isSecurityManagerEnabled(){
  return System.getSecurityManager() != null;
}

public static boolean isSecurityManagerEnabled ( ) { return System . getSecurityManager ( ) != null ; }
returns true if a security manager is enabled in the current jvm context .
