import Java.rmi.*;
/**
* This class is the client for RMIExampleServer
* @author Renga
**/
public class RMIClient {
/**
* Main method
* @param args Command-line arguments
**/
public static void main( String[] args ) {
try {
// Set the security manager
System.setSecurityManager( new RMISecurityManager() );
// Look up RMIExampleServer in the RMI registry
RMIExample server = (RMIExample) Naming.lookup( "RMIExample" );
// Invoke the method
System.out.println( server.sayHello() );
} catch( Exception e ) {
e.printStackTrace();
}
}
}