在ubuntu 10.04 64位操作系统上安装sun-java6-jdk。

时间:2021-04-15 22:10:42

I am trying to setup build enviroment for android on my ubunt10.04 machine. For that i want to install sun-java6-jdk as mentioned in source.andoid.com .

我正在尝试在ubunt10.04机器上安装android环境。因为我想在source.andoid.com中安装sun-java6-jdk。

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

$ sudo插件存储库“deb http://archive.canonical.com/ lucid partner”

$ sudo apt-get update

$ sudo apt-get更新

$ sudo apt-get install sun-java6-jdk

$ sudo apt-get安装sun-java6-jdk。

But now I am getting the error as no package for sun-java6-jdk.

但是现在我将错误作为sun-java6-jdk的包。

so I want to know how to install suitable jdk for android build set up.

因此,我想知道如何为android构建安装合适的jdk。

4 个解决方案

#1


5  

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

Sun JDK由于授权许可而从Ubuntu中删除了:http://news.softpedia.com/news/Canonical-Will-Remove-Java-From-Ubuntu-241147.shtml。使用openjdk代替。

Although there is a ppa here https://launchpad.net/~sun-java-community-team/+archive/sun-java6 that lets you install the SunJDK, it's very out-of-date and looks abandoned.

虽然这里有一个ppa, https://launchpad.net/~sun-java-community team/+archive/sun-java6,让您安装SunJDK,但是它已经过时了,看起来已经被抛弃了。

#2


18  

you could install sun jdk for Ubuntu 10.04 in the same way as 10.10. The steps for installing java in 10.10 is described in http://java.dzone.com/articles/sun-java-6-ubuntu-1004-1010

您可以以10.10的方式在Ubuntu 10.04中安装sun jdk。在10.10中安装java的步骤在http://java.dzone.com/articles/sun-java-6-ubuntu-1004-1010中描述。

here's the steps of installing sun jdk, taken from that article:

下面是安装sun jdk的步骤:

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 repository mentioned above not available anymore, here is a manual-ish alternative in installing JDK: http://codingforme.wordpress.com/2012/05/14/installing-oracle-java-jdk-6-or-7-on-ubuntu-12-04/

如果上面提到的存储库不再可用,那么在安装JDK时,这里有一个手动的替代方法:http://codingforme.wordpress.com/2012/05/14/ installingoracle -java- JDK -6- 7-on-ubuntu-12-04/。

#3


0  

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

下载jdk-6u45-linux-x64。来自Oracle存储库并执行下面的代码。

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 ON : 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/

更多:http://peesquare.com/blogs/install - sun java 6 -在ubuntu - 10 - 04 - 12 - 04 - 12 - 10 - 13 - 04 - 13 - 10 - - 32位和64位——system/

#4


-1  

In my case, I'd rather download the required JDK directly from Sun's homepage. Once you download and unzip it, then all you need to do is simply adding an environment variable, JAVA_HOME. That's it. It is very simple and works regardless of ubuntu version.

在我的例子中,我宁愿直接从Sun的主页下载所需的JDK。下载并解压缩后,只需添加一个环境变量JAVA_HOME即可。就是这样。它非常简单,无论ubuntu的版本如何。

#1


5  

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

Sun JDK由于授权许可而从Ubuntu中删除了:http://news.softpedia.com/news/Canonical-Will-Remove-Java-From-Ubuntu-241147.shtml。使用openjdk代替。

Although there is a ppa here https://launchpad.net/~sun-java-community-team/+archive/sun-java6 that lets you install the SunJDK, it's very out-of-date and looks abandoned.

虽然这里有一个ppa, https://launchpad.net/~sun-java-community team/+archive/sun-java6,让您安装SunJDK,但是它已经过时了,看起来已经被抛弃了。

#2


18  

you could install sun jdk for Ubuntu 10.04 in the same way as 10.10. The steps for installing java in 10.10 is described in http://java.dzone.com/articles/sun-java-6-ubuntu-1004-1010

您可以以10.10的方式在Ubuntu 10.04中安装sun jdk。在10.10中安装java的步骤在http://java.dzone.com/articles/sun-java-6-ubuntu-1004-1010中描述。

here's the steps of installing sun jdk, taken from that article:

下面是安装sun jdk的步骤:

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 repository mentioned above not available anymore, here is a manual-ish alternative in installing JDK: http://codingforme.wordpress.com/2012/05/14/installing-oracle-java-jdk-6-or-7-on-ubuntu-12-04/

如果上面提到的存储库不再可用,那么在安装JDK时,这里有一个手动的替代方法:http://codingforme.wordpress.com/2012/05/14/ installingoracle -java- JDK -6- 7-on-ubuntu-12-04/。

#3


0  

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

下载jdk-6u45-linux-x64。来自Oracle存储库并执行下面的代码。

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 ON : 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/

更多:http://peesquare.com/blogs/install - sun java 6 -在ubuntu - 10 - 04 - 12 - 04 - 12 - 10 - 13 - 04 - 13 - 10 - - 32位和64位——system/

#4


-1  

In my case, I'd rather download the required JDK directly from Sun's homepage. Once you download and unzip it, then all you need to do is simply adding an environment variable, JAVA_HOME. That's it. It is very simple and works regardless of ubuntu version.

在我的例子中,我宁愿直接从Sun的主页下载所需的JDK。下载并解压缩后,只需添加一个环境变量JAVA_HOME即可。就是这样。它非常简单,无论ubuntu的版本如何。