ConvertService cs = (ConvertService) Naming.lookup("ConvertService"); try { System.out.println(cs.convert(5)); } catch (RemoteException re) { System.out.println("Couldn't convert integer " + re); }