Sample Programs for the cam.netapp package

 

Chris Anderson © UCLA

Updated 07/15/98 CRA


The first sample program consists of two classes Front.java and Back.java.

For a "local" tryout:

  1. Place the classes in the netapp package in a directory netapp that is a subdirectory of a directory named cam. Compile the classes in the package.
  2. Compile both Front.java and Back.java.
  3. Start the ServerManager by invoking it's main(…) method. (On a PC you would typically open a DOS command window and then start the program from the command line). See the ServerManager documentation for more details
  4. Run Front.main() by executing the command java Front or by specifying the Front.class as the starter class file within an IDE (i.e. Visual Café etc).
  5. Make sure that your classpath contains the directory in which the cam directory is contained. The concatenation of a directory in your classpath and /cam/netapp should yield the exact location on your machine where the netapp package files stored.

For a "remote" tryout;

  1. Place the classes in the netapp package in a directory netapp that is a subdirectory of a directory named cam. Compile the classes in the package. This must be done on both the local and the remote machine.
  2. Edit the file Front.java and change the address "127.0.0.1" in the main invocation to the address of the remote machine.
  3. On the local machine compile Front.java.
  4. On the remote machine, place Back.java in the same directory as the netapp package files. Compile Back.java.
  5. On the remote machine start the ServerManager by invoking it's main(…) method. See the ServerManager documentation for more details
  6. Run Front.main() on the local machine by executing the command java Front or by specifying Front.class as the starter class file within an IDE (i.e. Visual Café' etc).
  7. Make sure that your classpath contains the directory in which the cam directory is contained. The logic is that the concatentation of the one of the directories listed in your classpath and cam/netapp should yield the exact location on your machine where netapp package files stored.