ubuntu下多版本java,javac支持Android源码编译

最近需要分别编译Android2.1,Android2.2,Android2.3.ubuntu10.10只有Sun-JDK1.6,所以安装了1.5.记录一下

1 添加apt源 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
deb-src http://archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse


2 安装1.5

apt-get install sun-java5-jdk.

3 选择java和javac的版本

update-alternatives --config java
update-alternatives --config javac

Tags: , ,

星期六, 三月 26th, 2011 工具

Leave a Reply

1LMooBmUE153Wnd3zDryWvDyXxQudbFxDr