Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just installed the latest java in /usr/jdk/jdk1.6.0_30

Now how do I make this java is the default java for the entire OS? As of now it is still using java 1.5

Thanks.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Found it...

$which java
/usr/bin/java
$ls -ld /usr/bin/java
lrwxrwxrwx 1 root other 16 Apr 8 12:41 /usr/bin/java -> ../java/bin/java
$rm /usr/bin/java
$ln -s /usr/jdk/jdk1.6.0_27/bin/java /usr/bin/java
$java -version
java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) Server VM (build 20.2-b06, mixed mode)
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.