Pages - Menu

18 October 2011

Installing Sun Java 6 on Ubuntu 11.10 - Oneiric Oclrot

There are two Java versions available one is OpenJDK and other is from Sun called Sun Java.
OpenJDK is supported by Ubuntu team and is directly available for download through Software Center.

OpenJDK works with most of applications offline or online, but some applications like Minecraft do not work on OpenJDK (well at least in case of me, it didn't). So here's how to download and install Sun Java 6 for Ubuntu 11.10 Oneiric Ocleot.

Step 1: Add an additional repository in your software sources list by 
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"

Yes MAVERICK partner even if u have Oneiric running. This is because Canonical still didn't upload the sun-java6-jre and sun-java6-jdk packages to the Oneiric repos. You could later remove the Maverick repository.

Step 2: Update your sources list with 
sudo apt-get update

Step 3: Now install whichever package you want, either Java6-JRE which is Java Runtime Environment meant for just running Java apps or Java6-JDK - Java Development Kit meant for programming in Java by.
sudo apt-get install sun-java6-jre  (For Java6-JRE)
                                  OR
sudo apt-get install sun-java6-jdk (For Java6-JDK)
Accept all the license agreements from Java in terminal. 
If you aren't able to click the <OK> button, press TAB and enter.

This would install Java6 packages into your Ubuntu. 
You could even download and install Java from http://java.com. 

No comments:

Post a Comment