public static void checkSecurity() {
        SecurityManager securityManager = System.getSecurityManager();
        if (securityManager != null) {
            securityManager.checkPermission(new ManagementPermission(PERMISSION_NAME_CONTROL));
        }
    }
public static void checkSecurity ( ) { SecurityManager securityManager = System . getSecurityManager ( ) ; if ( securityManager != null ) { securityManager . checkPermission ( new ManagementPermission ( PERMISSION_NAME_CONTROL ) ) ; } }
If JVM security manager exists then checks JVM security 'control' permission.