Pages

Search my Blog!

Saturday, May 22, 2010

Installing Sun’s JAVA on Ubuntu Lucid Lynx (10.04)

I successful installed Sun's JAVA on Ubuntu 9.04 (Jaunty Jackalope) and later, on Ubuntu 9.10 (Karmic Koala) I upgraded from 9.04. With introduction of Ubuntu 10.04 (Lucid Lynx), I decided not to upgrade but freshly installed it.
When I tried to install Sun (Oracle) Java, through apt-get, I got the error message saying package (sun-java6-jdk) is missing. After researching on net, I found that since Lucid Lynx, Ubuntu opted for OpenJDK, which I think is a good I idea. But what about those previous programs that explicitly need Sun Java? What about those who are using Sun Java to learn Java programming as part of their curriculum? Good news, Ubuntu still shipping Sun Java, but in partners section. So you need to add that section to your sources and install Sun's JDK as follows:

#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
#sudo apt-get update
#sudo apt-get install sun-java6-jdk

You will need to accept the license agreement.

You may also need to install the java plugin for firefox. This is done as follows:

#sudo apt-get install sun-java6-plugin

After installing, your Ubuntu has two jdk, OpenJDK and Sun's JDK. If you want to use Sun's JDK instead of OpenJDK (which is the default option) type the following command:

#sudo update-alternatives --config java


A window will open showing your installed jdks, from there, you can change to your preferred jdk.

Next, I will write to you the difference between OpenJDK and Sun JDK.

Any comment? Any question? Welcome again.

No comments:

Post a Comment