android 4.0 luch full-eng

7,013 views
Skip to first unread message

ADEN

unread,
Nov 15, 2011, 6:58:59 AM11/15/11
to Android Building
Hello!

I'm trying to compile from source code Android 4.0.1-r1, but when run
"lunch full-eng" I get the error:
"build/core/config.mk:268: *** Error: could not find jdk tools.jar,
please install JDK6, which you can download from java.sun.com. Stop."

I have installed JDK6:

localhost ics # eselect java-vm list
Available Java Virtual Machines:
[1] sun-jdk-1.6 system-vm

In file "build/core/config.mk:268" the script is executed in build/
core/find-jdk-tools-jar.sh when it run in my hand, the console
provides "run-java-tool"

Sorry for my english.

Conley Owens

unread,
Nov 15, 2011, 12:42:17 PM11/15/11
to android-...@googlegroups.com
Hi,

Could you please provide more information about your environment? Are
you using Ubuntu? If so, what version and architecture?

Did you install the jdk using a different method or did you use the
steps provided at:
http://source.android.com/source/initializing.html

~cco3

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>

ADEN

unread,
Nov 16, 2011, 2:54:15 AM11/16/11
to Android Building
I am use amd64 gentoo linux and 5 days ago i successfully compile
android 2.3.7 with no errors. After init and sync android 4.0.1_r1 i
have that error.

Command "java-vm-config" work perfect and told me that I have JDK6.

May be iI need resync?

Conley Owens

unread,
Nov 16, 2011, 12:09:44 PM11/16/11
to android-...@googlegroups.com
My guess is that your version of the sun JDK is slightly different
than the one provided by Ubuntu. You may want to try building in a
virtual machine like virtualbox, where you could run Ubuntu.

Elliott Polk

unread,
Nov 16, 2011, 12:14:06 PM11/16/11
to android-...@googlegroups.com
I've had issues in the past trying to build with the openJDK. The sunJDK tends to perform better overall. Not quite sure why...

Doug Schaefer

unread,
Nov 16, 2011, 12:24:03 PM11/16/11
to android-...@googlegroups.com
The makefiles actually prevent you from using openJDK, at least on
master. I worked around it and got a compile error. Switched to sunJDK
and all was well.

On Wed, Nov 16, 2011 at 12:14 PM, Elliott Polk <tak...@gmail.com> wrote:
> I've had issues in the past trying to build with the openJDK. The sunJDK
> tends to perform better overall. Not quite sure why...
>

Jean-Baptiste Queru

unread,
Nov 16, 2011, 1:40:29 PM11/16/11
to android-...@googlegroups.com
I confirm that there are build issues with OpenJDK, and that Sun JDK
is the only supported one.

JBQ

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Steev Klimaszewski

unread,
Nov 16, 2011, 1:09:17 PM11/16/11
to android-...@googlegroups.com
On Wed, Nov 16, 2011 at 11:14 AM, Elliott Polk <tak...@gmail.com> wrote:
> I've had issues in the past trying to build with the openJDK. The sunJDK
> tends to perform better overall. Not quite sure why...
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>

On my gentoo system, I use a patch written by a friend,

diff --git a/core/config.mk b/core/config.mk
index 41e60ea..1f949cb 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -264,10 +264,10 @@ ifeq ($(HOST_OS),darwin)
HOST_JDK_TOOLS_JAR :=
else
HOST_JDK_TOOLS_JAR:= $(shell $(BUILD_SYSTEM)/find-jdk-tools-jar.sh)
-ifeq ($(wildcard $(HOST_JDK_TOOLS_JAR)),)
-$(error Error: could not find jdk tools.jar, please install JDK6, \
- which you can download from java.sun.com)
-endif
+#ifeq ($(wildcard $(HOST_JDK_TOOLS_JAR)),)
+#$(error Error: could not find jdk tools.jar, please install JDK6, \
+# which you can download from java.sun.com)
+#endif
endif

# Is the host JDK 64-bit version?


Best Regards,
Steev

Jey Michael

unread,
Nov 16, 2011, 1:27:44 PM11/16/11
to android-...@googlegroups.com
FYI... If you are using openJDK, the android build (ICS) does not
start, and reports right away:
-------------------
You are attempting to build with the incorrect version of java.

Your version is: java version "1.6.0_20".
The correct version is: Java SE 1.6.
-------------------

You need to switch to the recommended java-6-sun
Would be nice to add the following tip to the "Initializing
Environment" doc, as well.
$ sudo update-java-alternatives -s java-6-sun

-Jey
PS: I am on Ubuntu 10.04


On Wed, Nov 16, 2011 at 9:14 AM, Elliott Polk <tak...@gmail.com> wrote:
> I've had issues in the past trying to build with the openJDK. The sunJDK
> tends to perform better overall. Not quite sure why...
>

Doug Schaefer

unread,
Nov 16, 2011, 2:08:58 PM11/16/11
to android-...@googlegroups.com
On Wed, Nov 16, 2011 at 1:27 PM, Jey Michael <jey.m...@gmail.com> wrote:
> FYI...  If you are using openJDK, the android build (ICS) does not
> start, and reports right away:
> -------------------
> You are attempting to build with the incorrect version of java.
>
> Your version is: java version "1.6.0_20".
> The correct version is: Java SE 1.6.
> -------------------
>
> You need to switch to the recommended java-6-sun
> Would be nice to add the following tip to the "Initializing
> Environment" doc, as well.
> $ sudo update-java-alternatives -s java-6-sun

Downloading the JRE from java.sun.com and setting JAVA_HOME to point
at the root of it worked for me as well.

ADEN

unread,
Nov 17, 2011, 12:02:35 AM11/17/11
to Android Building
I have installed jdk-6u29-linux-x64.bin (or in gentoo portage tree -
sun-jdk-1.6.0.29)
This version correct???

Conley Owens

unread,
Nov 17, 2011, 11:51:16 AM11/17/11
to android-...@googlegroups.com
apt-cache show sun-java6-jdk says "6.24-1."

If you can figure out how to get a version that works from portage or
directly from sun, that's great. Otherwise, you will really have to
install java from the repository suggested in the docs (which may mean
getting an Ubuntu install).

~cco3

ADEN

unread,
Nov 17, 2011, 2:58:47 AM11/17/11
to Android Building
Yes. If comment this lines - all work... But why after sync script
"find-jdk-tools-jar.sh" does not work???

Anatolii Isaiev

unread,
Dec 10, 2011, 4:51:04 PM12/10/11
to Android Building
Hi!

I just tried to run lunch full-userdebug and got the same problem.
But I solved it by this way:

I opened the file "build/core/find-jdk-tools-jar.sh" and saw that it
use ANDROID_JAVA_HOME variable. But in my system there are no such
variable and other code didn't work in this script.
So I checked and found that if I replace in this file
ANDROID_JAVA_HOME with just JAVA_HOME it works.

before:
if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/
tools.jar" ] ; then
echo $ANDROID_JAVA_HOME/lib/tools.jar

after:
if [ "x$JAVA_HOME" != x ] && [ -e "$JAVA_HOME/lib/tools.jar" ] ; then
echo $JAVA_HOME/lib/tools.jar

If somebody knows, say me if this is save because I'm not sure.
Thanks.

Joaquín Padilla

unread,
Jan 1, 2012, 1:40:08 PM1/1/12
to android-...@googlegroups.com
Alternatively, you can create an environment variable called $ANDROID_JAVA_HOME in your .bashrc, pointing to the /<path/to/JavaJDK>/ directory.

Logsemán

unread,
Jan 1, 2012, 8:13:30 AM1/1/12
to Android Building
I've run "lunch full-eng" successfully: instead of changing the .sh
file like Anatoli I created an environment variable, called
$ANDROID_JAVA_HOME, and added it to my .bashrc file:

# Variable ANDROID_JAVA_HOME
ANDROID_JAVA_HOME=~/path/to/jdk1.6.0_30
export ANDROID_JAVA_HOME
Reply all
Reply to author
Forward
0 new messages