Installing Java JDK on Linux Ubuntu 8.04 (Hardy Heron)
Sunday 27th April, 2008After I installed Ubuntu 8.04 I was surprised that now OpenJDK and also Sun JDK 1.6.0_06 is available via Synaptic apt-install 
But STOP! If you need to work with Eclipse or Glassfish this will not help you!
Glassfish is not installable using OpenJDK 
And Eclipse 3.3.2 will not run with Sun JDK 1.6.0_06 
So what should you do? Do not use Synaptic and install JDK 1.6.0_03 manually.
- Download JDK from the Sun Download Archive http://java.sun.com/products/archive/
chose JDK/JRE - 6 Version 6 update 3 (this version I have tested. Not sure if update 4 or 5 will also work) - copy 'jdk-6u3-linux-i586.bin' into /opt/java
- install JDK
>sudo ./jdk-6u3-linux-i586.bin - Now Change the standard link to java and java_vm in Ubuntu /usr/bin
>sudo mv /usr/bin/java_vm java_vm_default
>sudo mv /usr/bin/java java_default
>sudo ln -s /opt/java/jdk1.6.0_03/bin/java /usr/bin/java
>sudo ln -s /opt/java/jdk1.6.0_03/jre/bin/java_vm /usr/bin/java_vm
Ok now you can check your new installed Version of Java. Close all Terminal windows and check Java version with
>java -version
You should see :
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
Finished! Now Eclipse and Glassfish will work
Comments [3]