Building Android FS with non standard java installation

9 views
Skip to first unread message

nictam

unread,
Nov 24, 2009, 9:21:16 AM11/24/09
to android-platform
Hi,

I am trying to build Android FS (eclair AOSP) on a Ubuntu server where
I don't have sudo permissions. So I downloaded JDK 1.5 from Sun and
installed it on my file system (e.g. ~/java).

I am setting the following env var before building (based on this
discussion http://ubuntuforums.org/showthread.php?t=253530)

export JDK_HOME=~/java/jdk1.5.0_22
export PATH=$JDK_HOME/bin/:$JDK_HOME/jre/bin:$PATH
export MANPATH=${MANPATH}:$JDK_HOME/man/
export JAVA_HOME=$JDK_HOME

I have all kind of errors like these:

build/tools/droiddoc/src/DroidDoc.java:1000: cannot find
symbol
symbol : class
ClassDoc
location: class
DroidDoc
ClassDoc classDoc = (ClassDoc)
doc;

^
build/tools/droiddoc/src/DroidDoc.java:1009: cannot find
symbol
symbol : class
ClassDoc
location: class
DroidDoc
ClassDoc current =
classDoc;

^
build/tools/droiddoc/src/DroidDoc.java:1040: cannot find
symbol
symbol : class
Doc
location: class
DroidDoc
if ((entry instanceof Doc) && isHidden((Doc) entry))
{

^
build/tools/droiddoc/src/DroidDoc.java:1040: cannot find
symbol
symbol : class
Doc
location: class
DroidDoc
if ((entry instanceof Doc) && isHidden((Doc) entry))
{

^
build/tools/droiddoc/src/DroidDoc.java:1080: cannot find
symbol
symbol : class
Type
location: class
DroidDoc.HideHandler
if (proxy instanceof Type && methodName.equals
("toString"))
{

^
Note: Some input files use unchecked or unsafe
operations.
Note: Recompile with -Xlint:unchecked for
details.
136
errors

After settings the env var, I have the following Java install:

$ java -version
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) Server VM (build 1.5.0_22-b03, mixed mode)


If I don't set the env variables, I have this:

$ java -version
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Server VM (build 14.0-b16, mixed mode)

Is there a way I can configure my server (without root privileges) so
that I can build Android with Java installed in a non standard
location?

thanks

Jean-Baptiste Queru

unread,
Nov 24, 2009, 9:26:10 AM11/24/09
to android-...@googlegroups.com
Your best bet is to wait until we work our way through the changes
that will allow to build with a Java 1.6 host environment.

JBQ
> --
>
> You received this message because you are subscribed to the Google Groups "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.
>
>
>



--
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.

Ask

unread,
Nov 26, 2009, 12:41:19 AM11/26/09
to android-platform
Hi JBQ,

I am also getting the same errors as Nictam is getting on my ubuntu
9.04.
my java version is 1.5_15 only not 1.6.

Problem arises with erro code 41. and showing cannot found javadoc.

Thanks,
Asif

On Nov 24, 7:26 pm, Jean-Baptiste Queru <j...@android.com> wrote:
> Your best bet is to wait until we work our way through the changes
> that will allow to build with a Java 1.6 host environment.
>
> JBQ
>
>
>
>
>
> On Tue, Nov 24, 2009 at 6:21 AM, nictam <nic...@gmail.com> wrote:
> > Hi,
>
> > I am trying to build Android FS (eclair AOSP) on a Ubuntu server where
> > I don't have sudo permissions. So I downloaded JDK 1.5 from Sun and
> > installed it on my file system (e.g. ~/java).
>
> > I am setting the following env var before building (based on this
> > discussionhttp://ubuntuforums.org/showthread.php?t=253530)
> > For more options, visit this group athttp://groups.google.com/group/android-platform?hl=en.
>
> --
> 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.- Hide quoted text -
>
> - Show quoted text -

Jean-Baptiste Queru

unread,
Nov 30, 2009, 10:47:48 AM11/30/09
to android-...@googlegroups.com
Are you sure that you have a real Java and not one of the
alternatives? I seem to remember that some of the non-Sun
implementations don't have enough javadoc support to build Android.

JBQ
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

nictam

unread,
Nov 30, 2009, 3:07:58 PM11/30/09
to android-platform
On Nov 30, 4:47 pm, Jean-Baptiste Queru <j...@android.com> wrote:
> Are you sure that you have a real Java and not one of the
> alternatives? I seem to remember that some of the non-Sun
> implementations don't have enough javadoc support to build Android.

well, in fact it's now working fine... but I can hardly believe why...
if I add $JDK_HOME/jre/bin/ in my PATH, my build is failing, and if I
put $JDK_HOME/jre/bin (e.g. without the trailing '/') the build is
working fine. I have not taken the time to dig further.

so I confirm that I could build Eclair public code base with a non
standard installation of JAVA in my HOME folder (since I cannot make
'sudo' commands on my company's servers). [I also mentioned that here:
http://groups.google.com/group/android-platform/browse_thread/thread/558e83421b7c3333]

can you please confirm if the method looks good to you? I think there
should be many people out there that would be happy to have official
(I mean from google) instructions on how to build without messing up
the system config (e.g. installing new java).

Jean-Baptiste Queru

unread,
Nov 30, 2009, 4:16:43 PM11/30/09
to android-...@googlegroups.com
It looks like you've been making quite some discoveries.

It'd be great if you could put together some kind of "start to finish"
instructions and post them on this group (possibly in a new thread) so
that other people can validate them.

JBQ
> For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

nictam

unread,
Dec 1, 2009, 5:38:08 AM12/1/09
to android-platform
On Nov 30, 10:16 pm, Jean-Baptiste Queru <j...@android.com> wrote:
> It looks like you've been making quite some discoveries.
>
> It'd be great if you could put together some kind of "start to finish"
> instructions and post them on this group (possibly in a new thread) so
> that other people can validate them.

done. I have submitted a new topic 'Building Platform code with a non
standard JAVA installation', it's pending moderators approval for now.

let's follow up on this new thread.

thx

> JBQ
>
>
>
> On Mon, Nov 30, 2009 at 12:07 PM, nictam <nic...@gmail.com> wrote:
> > On Nov 30, 4:47 pm, Jean-Baptiste Queru <j...@android.com> wrote:
> >> Are you sure that you have a real Java and not one of the
> >> alternatives? I seem to remember that some of the non-Sun
> >> implementations don't have enough javadoc support to build Android.
>
> > well, in fact it's now working fine... but I can hardly believe why...
> > if I add  $JDK_HOME/jre/bin/ in my PATH, my build is failing, and if I
> > put $JDK_HOME/jre/bin (e.g. without the trailing '/') the build is
> > working fine. I have not taken the time to dig further.
>
> > so I confirm that I could build Eclair public code base with a non
> > standard installation of JAVA in my HOME folder (since I cannot make
> > 'sudo' commands on my company's servers). [I also mentioned that here:
> >http://groups.google.com/group/android-platform/browse_thread/thread/...]
Reply all
Reply to author
Forward
0 new messages