/*** HelloServImpl.java ***/ import java.rmi.*; import java.rmi.server.*; import java.net.*; public class HelloServImpl extends UnicastRemoteObject implements HelloInterface { public HelloServImpl() throws RemoteException { super(); } public String sayHello() throws RemoteException { return "Hello World!"; } public static void main(String args[]) { //Create and install a security manager System.setSecurityManager(new RMISecurityManager()); try { HelloServImpl h = new HelloServImpl(); Naming.rebind("//ils.unc.edu/hello", h); System.out.println("Hello Server ready"); } catch (RemoteException re) { System.out.println("HelloServImpl err: " + re); } catch (MalformedURLException e) { System.out.println("MalformedURLException in Impl " + e); } } }