Install sun-java6-jdk on ubuntu 10.04 64 bit os

I am trying to set up a build environment for android on my ubunt10.04 machine. For this, I want to install sun-java6-jdk, as indicated in source.andoid.com.

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

$ sudo apt-get update

$ sudo apt-get install sun-java6-jdk

But now I get the error as a package for sun-java6-jdk.

so I want to know how to install a suitable jdk for Android build.

+7
source share
4 answers

Sun JDK was removed from Ubuntu due to nonsense licensing: http://news.softpedia.com/news/Canonical-Will-Remove-Java-From-Ubuntu-241147.shtml . Use openjdk instead.

Although there is ppa https://launchpad.net/~sun-java-community-team/+archive/sun-java6 that allows you to install SunJDK, it is very outdated and looks abandoned.

+5
source

you can install sun jdk for Ubuntu 10.04 just like 10.10. The steps for installing java in 10.10 are described in http://java.dzone.com/articles/sun-java-6-ubuntu-1004-1010

here are the steps for installing sun jdk taken from this article:

add-apt-repository ppa:sun-java-community-team/sun-java6 apt-get update apt-get install sun-java6-jdk update-java-alternatives -s java-6-sun 

in case the above mentioned repository is no longer available, as an alternative when installing the JDK, an alternative is used manually: http://codingforme.wordpress.com/2012/05/14/installing-oracle-java-jdk-6-or-7 -on-ubuntu-12-04 /

+18
source

Download jdk-6u45-linux-x64.bin from the Oracle repository and execute the code below

 chmod u+x jdk-6u45-linux-x64.bin ./jdk-6u45-linux-x64.bin sudo mv jdk1.6.0_45 /opt sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.6.0_45/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/jdk1.6.0_45/bin/javac" 1 sudo update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" "mozilla-javaplugin.so" "/opt/jdk1.6.0_45/jre/lib/amd64/libnpjp2.so" 1 sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/jdk1.6.0_45/bin/javaws" 1 

MORE: http://peesquare.com/blogs/install-sun-java-6-on-ubuntu-10-04-12-04-12-10-13-04-13-10-both-32-bit- and-64-bit-system /

0
source

In my case, I would rather download the required JDK directly from the Sun homepage. Once you download and unzip it, you just need to add the JAVA_HOME environment variable. It. It is very simple and works regardless of the ubuntu version.

-one
source

All Articles