Server Fault is a question and answer site for system and network administrators. 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 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


share|improve this question
up vote 1 down vote accepted

Found it...

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


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.