Setting up the Java Environment for
CS 343: Artificial Intelligence



[A] Running the code from the course installation:

1. Setting up the classpath for java

On tcsh or csh shells in Unix: setenv CLASSPATH '.:/u/mooney/cs343-code'
On bash shell in Unix: export CLASSPATH='.:/u/mooney/cs343-code'

Instead of typing these in everytime you run the code, you can also add these lines in the .cshrc file (for tcsh or csh), or the .bashrc and .profile files (for bash).

2. Running the code

Follow the trace for Project 1 here for a list of possible commands to try out.

[C] Making your own copy of the code and running your installation:

1. Copy the ir sub-directory from the cs343-code directory into your HOME directory

At the command prompt, type: cp -r /u/mooney/cs343-code/ir $HOME

2. Setting up the classpath for java

On tcsh or csh shells in Unix: setenv CLASSPATH '.:/u/[your-login-name]'
On bash shell in Unix: export CLASSPATH='.:/u/[your-login-name]'

where [your-login-name] is your Unix login name.

Instead of typing these in everytime you run the code, you can also add these lines in the .cshrc file (for tcsh or csh), or the .bashrc and .profile files (for bash).

3. Running the code

Follow the trace for Project 1 here for a list of possible commands to try out.

4. Recompiling after modifying code in the ir directory

If you modify the file ABC.java, you can recompile it using the command: javac ABC.java