Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am on Oracle Linux 6 and I am trying to add the path:

/root/jrockit-jdk1.6.0_33-R28.2.4-4.1.0

to the PATH and JAVA_HOME variables. So, I login as root and I try:

export PATH=$PATH:/root/jrockit-jdk1.6.0_33-R28.2.4-4.1.0 and JAVA_HOME=/root/jrockit-jdk1.6.0_33-R28.2.4-4.1.0.

PATH does not even add my jdk path, and JAVA_HOME adds it as it should. When I echo JAVA_HOME from another terminal or after a reboot JAVA_HOME returns to default(empty).

I also edited the .bash_profile and .bashrc with vi and I added the above commands but nothing happened.

Any ideas how could I edit these variables properly?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Just add

export PATH=$PATH:/root/jrockit-jdk1.6.0_33-R28.2.4-4.1.0
export JAVA_HOME=/root/jrockit-jdk1.6.0_33-R28.2.4-4.1.0

to your .bash_profile and reload it with the command

source ~/.bash_profile
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.