URL codeURL;
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
int i = name.lastIndexOf('.");
if (i >= 0)
sm.checkPackageDefinition(name.substring(0, i));
}
try {
String codeName = name.replace('.", '/") + ".class";
if (name.startsWith("com.xyz.support"))
codeURL = new URL("http://" + server + codeName);
else codeURL = new URL(urlBase, codeName);
if (printLoadMessages)
System.out.println("Loading " + name + " from " + codeURL);
InputStream is = codeURL.openConnection().getInputStream();
byte buf[] = getClassBytes(is);
// Starting in 1.2 beta 4, we no longer use a code source in
// this example
// return defineClass(name, buf, 0, buf.length, cs, null);
return defineClass(name, buf, 0, buf.length);
} catch (Exception e) {
return null;
}