Installing the Sun Java 6 JDK in Ubuntu 12.04

I have the Java 6 OpenJDK, version 1.6.0_24. This meets the android Java requirement for 1.6.0, but I found (later in the build process) that Android really needs to be built by Sun’s Java SDK. In the meantime, the _24 suffix doesn’t check out in Android’s makefile, which produces the error  You are attempting to build with the incorrect version of java before exiting:

Commenting out the $(error stop) statement from build/core/main.mk on line 131 will allow compilation to proceed:

make will display the error message, but continue compiling. However, compiling with OpenJDK will probably create problems later in the build process(in out/target/common/obj/APPS/CtsVerifier_intermediates/classes-full-debug.jar). To fix the problems, Sun’s Java SDK will need to be installed.

Installing the Sun Java 6 JDK in Ubuntu 12.04

To fix the make: *** [out/target/common/obj/APPS/CtsVerifier_intermediates/classes-full-debug.jar] Error 41, get the most recent Sun JDK from here. Once you’ve downloaded it, install it and run update-alternatives so your system uses the Sun JDK:

To verify that the installation was successful, check Java’s version. It should now show that the Sun JDK is running instead of IcedTea:

To revert the changes after Android has been compiled, run update-alternatives to switch back to OpenJDK.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值