Pages

Thursday, April 19, 2012

Installing Oracle/Sun Java in Ubuntu 11.10

Mostly Linux systems comes with Open JDK. In order to install Sun/Oracle Java, follow the steps below. Please note! you will need sudo access for this. In this section I will install Sun/Oracle Java version 1.6.0_06.

  1. Test for Java version installed. Use command java -version.
  2. sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse"

  3. sudo apt-get update
  4. sudo apt-get install sun-java6-jdk


    Select Ok

    Select Yes
  5. java -version (check the java version installed)
  6. javac -version (check the javac version installed)

In case java is not showing Sun/Oracle JDK as default. You can use below command to set the default version of Java.

  • sudo update-alternatives --config java

No comments:

Post a Comment