Step Three: Install Files on the Client and Server Machines

Copy Add Client.class, AddServerImpl_Stub.cLass, and AddServer Intf.class to a directory on the client machine. Copy AddServer Intf.class, Add ServerImpl.c1ass, AddServer ImpCSkel.class, AddServer mpC Stub.class, and AddServer.c1ass to a  directory on the server machine

Step Four: Start the RMI Registry on the Server Machine

The JDK provides a program called rmi registry, which executes on the server machine. It maps names to object references. First, check that the CLASSPATH environment variable includes the directory in which your files arc located. Then, start the RMI Registry from the command line, as shown here:

Step Five: Start the Server

The server code is started from the command line, as shown here:

Step Six: Start the Client

The Add Client software requires three arguments: the name or address of the server machine and the two numbers that are to be summed together. You may invoke it from the command line by using one of the two formats shown here:

[vfb id=1]

Share This