/Users/lyon/j4p/src/net/rmi/simpleExample/RemoteHelloImplementation.java

1    package net.rmi.simpleExample; 
2    import java.rmi.RemoteException; 
3    import java.rmi.server.UnicastRemoteObject; 
4     
5    public class RemoteHelloImplementation 
6            extends UnicastRemoteObject 
7     implements RemoteHello { 
8     
9        private String msg = "Hello world"; 
10    
11       public RemoteHelloImplementation() 
12               throws RemoteException { 
13    
14       } 
15      public String getMsg() throws RemoteException { 
16          return msg; 
17      } 
18   } 
19   // use the rmic compiler to create a stub 
20   // rmic -v1.2 -d . net.rmi.simpleExample.RemoteHelloImplementation 
21