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:
- 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.
- Compile both Front.java and Back.java.
- 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
- 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).
- 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;
- 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.
- Edit the file Front.java and change the address "127.0.0.1" in the
main invocation to the address of the remote machine.
- On the local machine compile Front.java.
- On the remote machine, place Back.java in the same directory as the netapp package files. Compile Back.java.
- On the remote machine start the ServerManager by invoking it's main(…) method. See the ServerManager documentation for more details
- 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).
- 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.