本帖最后由 FSL_TICS_imx 于 2013-11-18 16:23 编辑
13、在MFGTool中设置U-Boot环境变量Q:是否可以通过MfgTool设置U-Boot的环境变量? 14、为了编译Android 如何在UBUNTU上安装Sun's JDK?
Q:如何在UBUNTU上安装Sun's JDK?
A:编译Android 源码,Sun's 1.6 SDK需要被安装,通过如下的命令你不能获得Sun's JDK :
$sudo add-apt-repository "deb http://archive.canonical.com/lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
#如下的操作可以帮助你克服以上的问题:
$ wget--no-cookies --header "Cookie:gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin(下载jdk-6u45-linux-x64.bin)
$ chmod u+xjdk-6u45-linux-x64.bin
$./jdk-6u45-linux-x64.bin
$ sudo mvjdk1.6.0_45 /opt
$ sudoupdate-alternatives --install /usr/bin/java java/opt/java/64/jdk1.6.0_45/bin/java 1
$ sudoupdate-alternatives --install /usr/bin/javac javac/opt/java/64/jdk1.6.0_45/bin/javac 1
$ sudoupdate-alternatives --install /usr/bin/jar jar /opt/java/64/jdk1.6.0_45/bin/jar1
#如果你已经安装了其他版本的JDK,这时候就好在编译android之前export JAVA_HOME env具体为:
$ exportJAVA_HOME=/opt/jdk1.6.0_45/
#或者也可以直接连接java binary到需要的sdk上,如下所示:
$ sudo ln -s/opt/java/64/jdk1.6.0_45/bin/jar /bin/jarsudo ln-s/opt/java/64/jdk1.6.0_45/java /bin/javasudo ln-s/opt/java/64/jdk1.6.0_45/javac /bin/javac
$ sudo ln -s/opt/java/64/jdk1.6.0_45/javah /bin/javah
$ sudo ln -s/opt/java/64/jdk1.6.0_45/javadoc /bin/javadoc
$ sudo ln -s/opt/java/64/jdk1.6.0_45/javaws /bin/javaws
|