Class regClass = Class.forName(
"org.apache.harmony.rmi.registry.RegistryImpl_Stub"); //$NON-NLS-1$
RemoteRef ref;
if (csf == null) {
ref = new UnicastRef(host, port, new ObjID(ObjID.REGISTRY_ID));
} else {
ref = new UnicastRef2(host, port, csf,
new ObjID(ObjID.REGISTRY_ID));
}
return (Registry) regClass.getConstructor(
new Class[] { RemoteRef.class }).newInstance(
new Object[] { ref });
} catch (Exception ex) {