Android 开发环境搭建---Android 编译需要的sun-java5-jdk在ubuntu10.04以上版本的安装问题

         ubuntu 9.10以上版本中,ubuntu就已经去除了对sun-java5-jdk的支持,但是为了进行android的开发,又必须安装sun-java5-jdk。那么在享受ubuntu 10.04中,如何来进行sun-java5-jdk的安装呢?

下面是一个方案:
  1.编辑/etc/apt/sources.list文件,将安装源更改为ubuntu 9.04的安装源为:
deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-proposed main restricted universe multiverse


 2. sudo apt-get install sun-java5-jdk


 3. 接下来的工作是,配置JRE环境:
   在shell执行: 
   sudo update-alternatives --config java
   通常会给出两个或两个以上选择的路径
   选择:/usr/lib/jvm/java-1.5.0-sun/jre/bin/java作为你的JRE 

 4.建议安装安装浏览器Java插件(不是必要的):
   在shell中执行:
   sudo apt-get install sun-java5-plugin

 

以上


你可能感兴趣的:(java,android,shell,浏览器,ubuntu,Deb)