Labels

Monday 14 April 2014

[ALL SYSTEM] Setup JAVA_HOME

Login as root user

vim /etc/profile

Set JAVA_HOME as follows using syntax export JAVA_HOME=<path-to-jdk>

If your jdk path is set to /usr/java/jdk1.5.0_07, add this command to file:

export JAVA_HOME=/usr/java/jdk1.5.0_07

Set PATH as follows:

export PATH=$PATH:$JAVA_HOME/bin

 then save file as following step:

step 1: press esc key on keyboard

step 2: press : key  on keyboard

step 3: type command w

step 4: press enter key on keyboard

After saving successfully run following command to force the system load that file profile again.

. /etc/profile  

 

  Run command java -version to check if successful

No comments:

Post a Comment