1

What I did :

made an entry in both ~/.bash_profile ~/.profile

export JAVA_HOME=/usr/java/jdk1.7.0_51 export PATH=$PATH:/usr/java/jdk1.7.0_51/bin

still system points to some openJDK installed by default Found by issuing java-version

So what can be done in this case ?

  • Tried . ~/bash_profile and the same with ~/.profile ? – schaiba Feb 6 '14 at 16:23
2

The OpenJDK version is being found first on your PATH. You can verify which one is being invoked by running

>which java

Try changing "export PATH" to put your new JDK first instead of last, like this:

>export PATH=/usr/java/jdk1.7.0_51/bin:$PATH

Start a new shell and then try "which java" or "java -version" - you should now get your new version.

  • you are just awesome. This Worked ! – Karthikeyan Feb 6 '14 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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