|
| |
As before, in order to run the example, we have to do the following steps:
- Start the RMI registry by running the rmiregistry
utility.
- Start the ComputeEngine server:
On Windows:
start java rmiServer.ComputeEngineServer
On Unix/Linux: java
rmiServer.ComputeEngineServer &
If all goes well, the server should output:
Setting SecurityManager ...
Using port 2001
Creating ComputeEngineImpl instance...
[Re]binding ComputeEngineImpl instance in registry...
Using url: rmi://localhost:2001/ComputeEngine
Ready to compute...
(Your port number may vary.)
- Run the ComputeEngine client:
java rmiClient.ComputeEngineClient
If all goes well, the client should display:
Using port 2001
Locating remote ComputeEngine...
Creating ComputePi instance...
Requesting remote computation...
Result: PI = 3.1415926535897932384626433832795028841972
Note: Again, the order in which we perform these steps
is important!
|