Wednesday, February 13, 2008

Setting Java Path

To set Java path for all user, it is needed to edit /etc/profile

Assuming that you have installed Java at /usr/java/jdk1.6.0_02
append the following lines at /etc/profile


export JAVA_HOME=/usr/java/jdk1.6.0_02
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=$JAVA_HOME/lib

You can also edit .bashrc to provide user specific Java path setup.

No comments: