import java.rmi.*; public class HelloClient { public static void main(String args[]) { System.setSecurityManager(new RMISecurityManager()); try { Hello h = (Hello) Naming.lookup("hello"); String message = h.sayHello(); System.out.println("HelloClient: " + message); } catch (Exception e) { System.out.println("Exception in main: " + e); } } }