if(name.startsWith("rmi:")){ name = name.substring(4); } URL u = new URL("http:" + name); String filename = u.getFile();    if (filename.charAt(0) == '/') return (getRegistry(u).lookup(filename.substring(1))); else return (getRegistry(u).lookup(filename));
URL u = parseURL(name); String serviceName = getName(u); return (getRegistry(u).lookup(serviceName));
public static Remote lookup(String name) throws NotBoundException, MalformedURLException, RemoteException {	// hack to accept "rmi://host:port/service" strings	if(name.startsWith("rmi:")){ name = name.substring(4); }	URL u = new URL("http:" + name);	String filename = u.getFile();	// If the filename begins with a slash we must cut it for	// name resolution.	if (filename.charAt(0) == '/')		return (getRegistry(u).lookup(filename.substring(1)));	else		return (getRegistry(u).lookup(filename));}