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 javaThe 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 \.)
oscar> source ~/.cshrc or oscar> source ~/.tcshrc
oscar> which javaThis will print the path to java. Hopefully this is show:
/usr/java/jdk1.5.0/bin/javaOr you can verify it by displaying the entire path using
oscar> echo $path