import java.rmi.*;
public class MagicNumberServer {
/* The Magic Number client-server system by J M Bishop Aug 2000
* =====================================
* adapted from the ThingServer Oct 1997
*
* Illustrates client-server using RMI
* Run by typing:
* In Window 2:
* java MagicNumberServer
*/
public static void main (String args []) throws RemoteException {
MagicNumber number = new MagicNumber ();
try {
Naming.rebind ("Magic Number Service", number);
}
catch (Exception x) {
System.out.println("Could not bind or no such host etc"+x);
}
System.out.println("The Magic number service is running");
}
}