|
| |
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:
- Start the RMI registry by running the rmiregistry
utility.
- 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...
- 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!
|