How to Install Java in Ubuntu 11.04 (Natty Narwhal) via PPA

by Binoy xavier on April 2, 2011

Ubuntu 11 Java

If you have just upgraded Ubuntu and want to install Java in the latest Ubuntu 11.04 (Natty Narwhal) Linux distro then here is how to do so. Since the official repo is not available now using the repository provided by lffl.org. you can add Personal Package Archives (PPA) in Ubuntu 11.04 via command line. Both Java Runtime Environment (JRE) and Java Development Kit (JDK) can be installed this way.

Steps to install Java in Ubuntu 11.04 via PPA using commands:

Open terminal window and then punch in the following commands,

Install JRE:

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin

Install JDK:

sudo apt-get install sun-java6-jdk

Get updates like "How to Install Java in Ubuntu 11.04 (Natty Narwhal) via PPA" for FREE! Subscribe to Compixels via RSS or via e-mail.

Comments on this entry are closed.

{ 16 comments }

RoS April 30, 2011 at 4:47 AM

Thanks! Really helpful :)

Rahul June 11, 2011 at 6:47 AM

This works perfectly – thanks!

Darcia June 11, 2011 at 4:26 PM

So much Thanks!!

daniel June 22, 2011 at 1:58 AM

quick and clean
thx

Olad June 29, 2011 at 10:14 AM

Greetings,
I am new to Ubuntu and the 11.04 version has been great so far. Thanks for the java help; it worked like a charm. However, I would like to know what the difference between JRE and JDK is and which 1 I ought to install?

xvidmaster97x July 17, 2011 at 1:02 AM

omfg thank you so much xD

Webdesign company bangladesh July 29, 2011 at 7:46 PM

Hello,
I want to install jdk in my ubontu 11.04 but it is said not possible,how can i repair it?

Manish August 3, 2011 at 9:47 AM

Thanx for posting..

ben1 August 17, 2011 at 4:54 PM

any way to download java without using your codes ….i just switched from windows to lunix ubuntu and i guess i was very wrong ….even the java games are not playable ……
where can i get java to play games on yahoo ….no codes no trash just click and here we go
what are all these complications

Nikolay August 21, 2011 at 2:25 PM

Thanks man !

Nikhil August 26, 2011 at 6:53 PM

I want to know the compatibility issues of GNOME3 with Natty

andres September 12, 2011 at 9:55 AM

Thanx a lot. Im new in ubuntu and I was having trouble installing java. Piece of cake with 3 simple lines. Thanx again!

suiters September 23, 2011 at 4:36 AM

I installed the sun-java6-jre sun-java6-plugin and sun-java6-jdk like you say, and note, I had to use the arrow keys to get by the license agreement.

Looks good, but I wonder if I should have used openjdk-6-jdk and openjdk-6-jre instead – maybe next time.

Alexandre Bourlier October 16, 2011 at 12:55 AM

Thanks, was really useful :)

Anand November 2, 2011 at 6:37 PM

Choosing the default Java to use:

If your system has more than one version of Java, type the following command in a terminal window:

sudo update-alternatives –config java

Isaid January 5, 2012 at 11:49 AM

So much Thanks!!