During lab, I provided incorrect information about your ~/.cshrc file. Below are instructions for editing that file and placing the correct contents within it.
Login to remus/romulus.
Open a terminal window. You should automatically be within your home directory, but to be sure that you are there, type:
cd ~
Now edit your .cshrc file, like so:
emacs .cshrc
Find the line that we added in lab to set the value of your CLASSPATH environment variable. Change that line so that it reads:
setenv CLASSPATH .:/home/staff/sfkaplan/public/cs12
Save the file and exit emacs.
Use the following command in your terminal window just this once to load the new setting for CLASSPATH:
source .cshrc
What is CLASSPATH? This is a special variable that tells the java command in which directories to look for compiled Java code. We set it to /home/staff/sfkaplan/public/cs12 because that is where the compiled Keyboard code is. However, we also need java to look in the current directory -- the one that contains your compiled code -- for you to be able to run your programs. The period character (.) is how you specify, on the command-line, the current directory. Thus, we have set the CLASSPATH so that java will first look in the current directory for any compiled code that it needs; if it doesn't find what it needs there, then it moves on to /home/staff/sfkaplan/public/cs12 instead. (Note that the colon (:) serves, in that setenv line, as a delimiter between directory names.)
When discussing how to get a sequence of characters from the user, I referred to the Keyboard.readLine() method. There is no such method. However, there is a Keyboard.readString() method that works exactly as I described the fictional Keyboard.readLine(), so use that instead.