Summary: How to configure your shell to use the Sun JDK on
the MathLAN machines.
Steps
-
Open the file ~/.bashrc in your favorite text editor
-
Somewhere near the end, but before any final export
commands, add the following lines:
JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
PATH=$JAVA_HOME/bin:$PATH
-
If there is already a line with an export command near
the end, make sure the environment variable PATH is among
the parameters, and also add JAVA_HOME to the list. In
other words, there may be other variables listed, but be sure
after the declarations listed in step 2, you have a line like the
following:
export PATH JAVA_HOME
-
Do the same thing to your ~/.bash_profile (you may have
already done this in class).
-
The next time you log in to MathLAN, you should see output
something like the following:
laplace:~$ which javac
/usr/lib/jvm/java-1.5.0-sun/bin/javac