if (SecurityManager.current == null) { try { Class.forName("java.security.Security"); } catch (ClassNotFoundException e) { } }
  public static synchronized void setSecurityManager(SecurityManager sm)  {    // Implementation note: the field lives in SecurityManager because of    // bootstrap initialization issues. This method is synchronized so that    // no other thread changes it to null before this thread makes the change.    if (SecurityManager.current != null)      SecurityManager.current.checkPermission        (new RuntimePermission("setSecurityManager"));    SecurityManager.current = sm;        }