Thursday, July 22, 2010

package rmiExample;

import java.rmi.Naming;

public class RmiClient {
      /**
       * Client program for the "Hello, world!" example.
       * @param argv The command line arguments which are ignored.
       */
      public static void main (String[] argv) {
        try {
          HelloInterface hello =
            (HelloInterface) Naming.lookup ("//ortles.ccs.neu.edu/Hello");
          System.out.println (hello.say());
        } catch (Exception e) {
          System.out.println ("HelloClient exception: " + e);
        }
      }

}

No comments:

Post a Comment