Java Reference
In-Depth Information
1. Compile all fi les with javac.
This time, there are fi ve fi les…
javac Bank1.java
javac Bank1Impl.java
javac Account.java
javac Bank1Server.java
javac Bank1Client.java
2. Start the RMI registry.
Enter the following command:
rmiregistry
The contents of the registry window will be identical to the screenshot shown in
Fig. 5.2 .
3. Open a new window and run the server.
From the new window, invoke the Java interpreter:
java Bank1Server
Server output is as shown in Fig. 5.3 .
4. Open a third window and run the client.
Again, invoke the Java interpreter:
java Bank1Client
Output is shown in Fig. 5.5 below.
Fig. 5.5 Output from the Bank1Client RMI program
Once again, the server process and the RMI registry will need to be closed down by
entering Ctrl-C in each of their windows.
Search WWH ::




Custom Search