This page was taken from ICL Consultant's wep space at http://www.cs.uic.edu/~consult/using/java.html with a few modifications made to clarify an issue or two.

Setting up your Path for jdk1.5.0

  1. Path Variable - Add the absolute path of the "/usr/java/jdk1.5.0/bin/java" directory to your Unix path variable, as follows.

    The path variable enables Solaris to find the executables (javac, java, javadoc, etc.) from any current directory. To find out if the path is currently set for any java tools, execute:

         oscar> echo $path 
    or
         oscar> which java 
    
    The first command wil display your entire path, while the second will print the path to java, if it can find it.

    If you use the C shell (csh) or T shell(tcsh), you can set the path in your startup file (~/.cshrc) or (~/.tcshrc). To determine which shell you are using, use the finger command. This will display the shell information for the specified user.

         oscar> finger i340
         Login: i340                             Name: Instructor account for CS340
         Directory: /home4/instruct/i340         Shell: /bin/tcsh
         .
         :
    
    For the .tcshrc file, the following line will add the java 1.5 directory at the beginning of your path and the current directory at the end of your path.
         set path=(/usr/java/jdk1.5.0/bin $path \.)
    

  2. Then load the startup file using the source command with the name of the startup file.
         oscar> source ~/.cshrc 
    or
         oscar> source ~/.tcshrc 
    
  3. Finally verify that the path is set by repeating the "which" command above:
         oscar> which java
    
    This will print the path to java. Hopefully this is show:
         /usr/java/jdk1.5.0/bin/java
    
    Or you can verify it by displaying the entire path using
         oscar> echo $path 
    
For more information on Java, click here: Java_README
Java's HomePage