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 }
Thanks! Really helpful
This works perfectly – thanks!
So much Thanks!!
quick and clean
thx
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?
omfg thank you so much xD
Hello,
I want to install jdk in my ubontu 11.04 but it is said not possible,how can i repair it?
Thanx for posting..
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
Thanks man !
I want to know the compatibility issues of GNOME3 with Natty
Thanx a lot. Im new in ubuntu and I was having trouble installing java. Piece of cake with 3 simple lines. Thanx again!
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.
Thanks, was really useful
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
So much Thanks!!