Changing Java from OpenJDK to SunJava

Posted on

Problem :

I want to change OpenJDK to SunJava in my ubuntu linux desktop , i have downloaded the “jdk-7.tar.gz” from sun’s website, but there problem is how to make the system to use the newly downloaded java ? I tried adding the new jdk/bin/java to my PATH ( from .bashrc ) but that seem not to work (cause probably OpenJDK’s path is inside my PATH variable as well , so the system checks that first)

Here’s my JDK7 : /usr/lib/jdk7/bin/java
Here’s what $(which java) outputs : /usr/bin/java
Thanks in advance

Solution :

.Try mv /usr/bin/java /usr/bin/java.old; ln -s /usr/lib/jdk7/bin/java /usr/bin/java

Leave a Reply

Your email address will not be published. Required fields are marked *