Content deleted Content added
Esmond.pitt (talk | contribs) →Example: Further removal of security manager stuff, not required in a simple example. |
Esmond.pitt (talk | contribs) →Example: Further simplification of example code |
||
Line 26:
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.rmi.registry.*;
Line 35 ⟶ 34:
public RmiServer() throws RemoteException {
super(0); // required to avoid the 'mic' step, see below
}
Line 42 ⟶ 41:
}
public static void main(String args[]) throws Exception {
System.out.println("RMI server started");
Line 52 ⟶ 51:
System.out.println("java RMI registry already exists.");
}
RmiServer obj =
▲ System.out.println("PeerServer bound in registry");
}
}
Line 84 ⟶ 77:
<source lang=java>
import java.rmi.Naming;
public class RmiClient {
obj = (RmiServerIntf)Naming.lookup("//localhost/RmiServer");▼
public static void main(String args[]) throws Exception {
}
</source>
|