/**
* This demo is client using a remote class.
*
*
*
* Copyright © 1999 E. W. Grundke. All rights reserved.
* @author E. W. Grundke
*/
import java.rmi.*;
public class RmiClientDemo {
public static void main(String[] args) {
System.setSecurityManager(new RMISecurityManager());
String url = "rmi://localhost/";
//or: String url = "rmi:///"; // default: local
//or: String url = "rmi://129.173.66.61/";
try {
RemoteInterfaceDemo m1 = (RemoteInterfaceDemo)Naming.lookup(url+"Z");
System.out.println(m1.abs());
}
catch (Exception e) {System.out.println("My Client error "+e);}
System.exit(0);
}
}