You can set this given below in .bash_profile file,
JAVA_HOME=/etc/jdk1.7.0_07/
export JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin
It seems like it works just for while,
but after closing console have to do this again..
How to install it permanently?
You should add these lines to ~/.bashrc
,
which is sourced by interactive shells,
while ~/.bash_profile
is only sourced by interactive login shells.
To verify, open a new shell and echo "$JAVA_HOME"
.
No comments:
Post a Comment