首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Ubuntu10.10筹建Android开发环境

2012-07-04 
Ubuntu10.10搭建Android开发环境Installing the JDKThe Sun JDK is no longer in Ubuntus main package r

Ubuntu10.10搭建Android开发环境
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.

Java 6: for Gingerbread and newer

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk


最后设置JAVA环境
ln -s /usr/lib/jvm/java-6-sun/bin/javac   /etc/alternatives/javac 
ln -s /usr/lib/jvm/java-6-sun/bin/java     /etc/alternatives/java

ln -s /usr/lib/jvm/java-1.5.0-sun/bin/javac   /etc/alternatives/javac 
ln -s /usr/lib/jvm/java-1.5.0-sun/bin/java     /etc/alternatives/java
sudo ln -s /usr/lib/jvm/java-1.5.0-sun/bin/javadoc /etc/alternatives/javadoc

$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
java -version
javac -version

热点排行