Make sure you have the Java Development Kit (JDK 1.1 or later) installed on your machine. The ANS programs are written in Java, and need the Java Development Kit to run. To verify that your machine can access the JDK, type "which java" followed by a carriage return [CR] at any Unix prompt. Then, to verify that your machine is running java version 1.1 or later, type "java -version" followed by another carriage return [CR].
Verifying Java Example
> which java [CR]
usr/local/bin/java
> java -version [CR]
java version 1.1.5
|
To download the latest version of the JDK, go to the Java website. We also keep a copy of the Documentation for JDK on the Andrew File System (AFS).
Set or verify your CLASSPATH environment variable. To check your CLASSPATH setting, type "echo $CLASSPATH" at any Unix prompt:
Checking CLASSPATH Example
> echo $CLASSPATH [CR]
/afs/cs.cmu.edu/project/pleiades/java/pleiades_classes/java
|
If your CLASSPATH is not set or set incorrectly, you have two options:
- Option 1: You can set your CLASSPATH in your .login file, so that it is specified automatically each time you login to your machine. Your .login file is located in your home directory, which can be reached by typing "cd" followed by a carriage return [CR] at any Unix prompt. Or you can specify the full path: cd /afs/cs.cmu.edu/user/<username>
The CLASSPATH setting should be added to the section of your .login labeled "Set environment variables."
Setting CLASSPATH Example #1
# ------------------------------------------------------
# Set environment variables
# ---- Add environment variables immediately below ----
setenv CLASSPATH /afs/cs.cmu.edu/project/pleiades/java/pleiades_classes/java
|
Save your new .login file to your home directory.
Option 2: You can set or reset your CLASSPATH from any Unix prompt. This is useful if you wish to override temporarily the CLASSPATH specified in your .login file, or check your CLASSPATH via the "echo" command.
Setting CLASSPATH Example #2
setenv CLASSPATH /afs/cs.cmu.edu/project/pleiades/java/pleiades_classes/java [CR]
echo $CLASSPATH [CR]
/afs/cs.cmu.edu/project/pleiades/java/pleiades_classes/java
|