import java.net.*; public class NameRmiClient { public static void main(String args[]) { try { NameService r = (NameService) java.rmi.Naming.lookup("rmi://linux02/MyNameServer"); r.insert("p1", "tick.ece", 2058); InetSocketAddress entry = r.search("p1"); if (entry != null) System.out.println(entry.toString()); } catch (Exception e) { System.out.println(e); } } }