String urlName = name.replace('.", '/");
byte buf[];
Class cl;
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
int i = name.lastIndexOf('.");
if (i >= 0)
sm.checkPackageDefinition(name.substring(0, i));
}
try {
URL url = new URL(urlBase, urlName + ".class");
if (printLoadMessages)
System.out.println("Loading " + url);
InputStream is = url.openConnection().getInputStream();
buf = getClassBytes(is);
// Starting in 1.2 beta 4, the signature of this method has
// changed
// cl = defineClass(name, buf, 0, buf.length, cs, null);
cl = defineClass(name, buf, 0, buf.length, cs);
return cl;
} catch (Exception e) {
System.out.println("Can't load " + name + ": " + e);
return null;
}