ClassLoader () { // Check if we may return the parent classloader. SecurityManager sm = SecurityManager.current; if (sm != null) { ClassLoader cl = VMStackWalker.getCallingClassLoader(); if (cl != null && ! cl.isAncestorOf(this)) sm.checkPermission(new RuntimePermission("getClassLoader")); } return parent; }