Search This Blog

Tuesday, February 1, 2011

No more Sun Java on Ubuntu 10.04

Sun Java packages have been dropped from Ubuntu 10.04 LTS from the Multiverse section of Ubuntu archive. Ubuntu team is encouraging users to use OpenJDK instead of Sun JDK/JRE but still if you want to install Sun JDK on your Ubuntu then here is the solution for the same.

perform the following four steps to install the package.
1. Add the Canonical Partner Repository to your apt repositories:

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
2. Update the source list

$ sudo apt-get update

3. Install sun-java6-jdk

$ sudo apt-get install sun-java6-jdk



4. Select Sun’s Java as the default on your machine.
$ sudo update-java-alternatives -s java-6-sun
The full JDK which will be placed in /usr/lib/jvm/java-6-sun (well, this directory is actually a symlink on Ubuntu).

After installation, make a quick check whether Sun’s JDK is correctly set up:
1user@ubuntu:~# java -version
2java version "1.6.0_20"
3Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
4Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

No comments:

 
ss_blog_claim=610c329374fdaea5e07dfca1c6dffb2d