在android 的官网看到的。androd 官网
Installing the JDK
The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
Java 5: for Froyo and older
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse" $ sudo add-apt-repository "deb http:/
Java 6: for Gingerbread and newer/archive.ubuntu.com/ubuntu hardy-updates main multiverse" $ sudo apt-get update $ sudo apt-get install sun-java5-jdk
Note: The lunch
command in the build step will ensure that the Sun JDK isused instead of any previously installed JDK.