How to install the Sun Java JDK on Ubuntu 10.10 (Maverick Meerkat)?

JavaUbuntu

Java Problem Overview


I've tried to add the Canonical Partner repository, but I still can't find the sun-java6-jdk package. What is the right way to install the Oracle Sun JDK instead of OpenJDK on Ubuntu 10.10 (Maverick Meerkat)?

Java Solutions


Solution 1 - Java

Currently the Sun Java 6 packages are working fine now for Ubuntu 10.10 and 10.04 users. It works fine for me.

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-jdk

Solution 2 - Java

Update (2010/10/01): Yesss, Sun Java Finally Uploaded To The Ubuntu 10.10 Maverick Official Partner Repository.


Update (2010/09/27): Readers might want to check Sun Java6 Packages [updated]. I still expect official packages to be available in the partner repos at releast time though.


For an unknown reason, the sun-java6-jdk are not yet available in the partner repositories.

So either downloaded the required packages from http://archive.canonical.com/pool/partner/s/sun-java6/ and install them with dpkg -i.

Or temporarily replace the maverick partner repository

http://archive.canonical.com/ubuntu maverick partner

by the lucid one (replace maverick by lucid in the above line, let me know if you need more help to do this). Then, install sun-java6. And revert the change.

Solution 3 - Java

sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

Solution 4 - Java

Installation:

for 10.10:

sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"

for 11.04

sudo add-apt-repository "deb http://archive.canonical.com/ natty partner"

Continue with:

sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin

Use as default:

sudo update-alternatives --config java

Installing JDK:

sudo apt-get install sun-java6-jdk

Source code (to be used in development):

sudo apt-get install sun-java6-source

Source of these instructions: https://help.ubuntu.com/community/Java

Solution 5 - Java

All you need to do is uncomment the two lines in /etc/apt/sources.list that refer to "partner"

sudo nano /etc/apt/sources.list
# uncomment the two lines referring to "partner"
sudo apt-get update 
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

(I can't find the command add-apt-repository on Ubuntu 10.10, 64 amd ... even searching with apt-cache yields nothing)

Solution 6 - Java

It is working fine for me, but with a different command:

root@ubuntu:/usr/bin# sudo apt-get install sun-java6

Error message:

> Couldn't find package sun-java6.

root@ubuntu:/usr/bin# sudo apt-get install sun-java*

Bam, it worked.

Solution 7 - Java

You might have to use the version in the Lucid partner repository. I did this in Lucid (I used the version from Karmic multiverse, before I realized it had been moved to the partner repo), and it worked fine. Not sure where it went in Maverick though.

Solution 8 - Java

I am assuming that you need the JDK itself. If so you can accomplish this with:

sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-jdk

You don't really need to go around editing sources or anything along those lines.

Solution 9 - Java

This worked for me:

sudo add-apt-repository ppa:sun-java-community-team/sun-java6

sudo apt-get update

sudo apt-get install sun-java6-jre sun-java6-jdk

Solution 10 - Java

For Ubuntu 10.10 Desktop simply do this: Ubuntu - Installing Java.

Solution 11 - Java

If add-apt-repository it's not working try this:

sudo apt-get install python-software-properties

That package is required in order to execute that command, in my server it wasn't installed by default (Ubuntu server x64)

Solution 12 - Java

Solution 13 - Java

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionIvanView Question on Stackoverflow
Solution 1 - JavaGaurav JassalView Answer on Stackoverflow
Solution 2 - JavaPascal ThiventView Answer on Stackoverflow
Solution 3 - JavaYoshiView Answer on Stackoverflow
Solution 4 - JavaAlikElzin-kilakaView Answer on Stackoverflow
Solution 5 - JavaearcamView Answer on Stackoverflow
Solution 6 - JavamoeView Answer on Stackoverflow
Solution 7 - JavaTim YatesView Answer on Stackoverflow
Solution 8 - JavaAfroRickView Answer on Stackoverflow
Solution 9 - Javaneki likView Answer on Stackoverflow
Solution 10 - JavaPete LongView Answer on Stackoverflow
Solution 11 - JavaJosue Efrain Didier BalbuenaView Answer on Stackoverflow
Solution 12 - JavaKeremView Answer on Stackoverflow
Solution 13 - JavarobeidView Answer on Stackoverflow