Table of Contents


How to Run Java RMI Programs

There are several ways to run the rmi programs. Some of which are simpler than I am about to describe but their result is to have all objects on the same machine. We would prefer a more generous distribution so we will have to tolerate a little bit more difficulty.

1. We will run any remote objects that will be loaded by a n applet on spring.cs.clemson.edu. That will necessitate the use of the registry on spring as well. To eliminate port contention, the list below provides each of you with a port. When you invoke the registry use the commend

rmiregistry xxxx &

Where the xxxx is your assigned port number.

Port Numbers for Spring

Anand 5000

Cho 5005

Curry 5010

El-Tantawy 5015

Gong 5020

Jagadesan 5025

Kulkarni 5030

Miller 5035

Mordhorst 5040

Pereira 5045

Rammohan 5050

Reilly 5055

Saraogi 5060

Sullivan 5065

2. Please make the following change to HelloApplet.java.

Replace the line that uses getCodebase() with:

Hello obj = (Hello)Naming.lookup("//spring.cs.clemson.edu:"yourPortNumber"/HelloServer");

This change breaks the dependence on the applet classloader which will be default go to the

The following diagram makes the architecture of the example somewhat more clear(Thanks to Deepak)

Here is an OID that may give further details.