The problem as I understand it is that you have installed java but your shell doesnt know where to find it.
There are two main options if this is the problem.
The first and simplest is to modify the PATH environment variable
in bash:
Code:
export PATH=$JAVAPATH:$PATH
in tcsh:
Code:
setenv PATH $JAVAPATH:$PATH
Note that you need to replace $JAVAPATH in the above commands with the path to the bin directory in your java installation, i dont know where it will be on your machine but mine is "/usr/local/jdk1.5.0_02/bin"
On tcsh you will need to run
to be able to use the new commands.
The other alternative is to create symbolic links to the executables in a directory already in the PATH (such as /usr/local/bin) using something like:
Code:
ln -s $JAVAPATH/* /usr/local/bin/
Again replacing $JAVAPATH with the path to java's bin directory. With tcsh you will need to 'rehash' so that it finds the new commands.
The approach I prefer to use is to create a symbolic link called /usr/local/java which points to the directory java is installed to, and then use
Code:
ln -s /usr/local/java/bin/* /usr/local/bin/
to create links to java and javac in /usr/local/bin. The advantage to this approach is that when I update java, I only need to change the target of one link (/usr/local/java) and
all my commands are updated to the new version.