try {
Support_ClassLoader factory;
if ("Dalvik".equals(System.getProperty("java.vm.name"))) {
factory = (Support_ClassLoader)Class.forName(
"tests.support.Support_ClassLoader$Dalvik").newInstance();
} else {
factory = (Support_ClassLoader)Class.forName(
"tests.support.Support_ClassLoader$RefImpl").newInstance();
}
return factory.getClassLoader(url, parent);
} catch (Exception ex) {
throw new RuntimeException("Unable to create ClassLoader", ex);
}