Running The Example
Home ] Up ] The Remote Interface ] The Remote Implementation ] The Client Program ] [ Running The Example ]

 

 

Now, with all the pieces constructed, we can run the example.

It's not as straightforward as running a regular Java program!  Here's what we have to do:

  1. Start the RMI registry by running the rmiregistry utility.
  2. Start the Hello Server:

    On Windows:        start java rmiServer.HelloServer

    On Unix/Linux:        java rmiServer.HelloServer &

    If all goes well, the server should output:

    Server ready...
  3. Run  the Hello client:

    java rmiClient.HelloClient

    If all goes well, the client should output:

    Response: Hello, RMI world!

Note: The order in which we perform these steps is important!

 
The page was last updated February 19, 2008