Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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
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


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.