package rmi;
import java.rmi.RMISecurityManager;
public class ComputeClient {
public static void main(String args[]) {
System.setSecurityManager(new RMISecurityManager());
try {
lookUpServerAndExecute();
} catch (Exception e) {
e.printStackTrace();
}
}
private static void lookUpServerAndExecute()
throws java.rmi.NotBoundException,
java.net.MalformedURLException,
java.rmi.RemoteException {
String url = "rmi://localhost/ComputeServer";
Computable c =
(Computable) java.rmi.Naming.lookup(url);
c.println("this is cool");
}
}