protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { return findSystemClass(name); }
public Class loadClass(String name) throws ClassNotFoundException { try { return super.findSystemClass(name); } catch(ClassNotFoundException x) { try { String url = path + name.replace('.', '/') + ".class"; InputStream is = new URL(url).openConnection().getInputStream(); byte bytes[] = new byte[is.available()]; is.read(bytes); is.close(); Class result = defineClass(name, bytes, 0, bytes.length); resolveClass(result); return result; } catch(IOException y) { return null; } } } }
public synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException { // isn't this redundant? if (name.endsWith("$Proxy") && name.equals(compiler.getProxyClassName())) { return compiler.proxyType; } // delegate to the original class loader ClassLoader cl = getTargetClassLoader(); if (cl == null) { return super.findSystemClass(name); } return cl.loadClass(name); }
ret = super.findSystemClass(classname);