public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* ant with gcc
@ 2009-08-07 12:59 David Michel
  2009-08-10  8:57 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: David Michel @ 2009-08-07 12:59 UTC (permalink / raw)
  To: java

Hi All,

I have an issue with using ant with gcc:

While with Sun, I can simply set JAVA_HOME as such: export
JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.14/
so that ant can find /usr/lib/jvm/java-6-sun-1.6.0.14/lib/tools.jar
(which is essentially $JAVA_HOME/lib/tools.jar)

Somehow, I have trouble to do the same with my install of gcc:

'locate tools.jar' returns
'/local/gcc-4_4-branch/install/lib/jvm/lib/tools.jar' so that I've
put: export JAVA_HOME=/local/gcc-4_4-branch/install/lib/jvm/

But then, I get this:

$ ant
Unable to locate tools.jar. Expected to find it in
/local/gcc-4_4-branch/install/lib/tools.jar
Buildfile: build.xml does not exist!
Build failed

Any clues ?

Cheers
David

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ant with gcc
  2009-08-07 12:59 ant with gcc David Michel
@ 2009-08-10  8:57 ` Andrew Haley
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Haley @ 2009-08-10  8:57 UTC (permalink / raw)
  To: David Michel; +Cc: java

David Michel wrote:

> I have an issue with using ant with gcc:
> 
> While with Sun, I can simply set JAVA_HOME as such: export
> JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.14/
> so that ant can find /usr/lib/jvm/java-6-sun-1.6.0.14/lib/tools.jar
> (which is essentially $JAVA_HOME/lib/tools.jar)
> 
> Somehow, I have trouble to do the same with my install of gcc:
> 
> 'locate tools.jar' returns
> '/local/gcc-4_4-branch/install/lib/jvm/lib/tools.jar' so that I've
> put: export JAVA_HOME=/local/gcc-4_4-branch/install/lib/jvm/
> 
> But then, I get this:
> 
> $ ant
> Unable to locate tools.jar. Expected to find it in
> /local/gcc-4_4-branch/install/lib/tools.jar
> Buildfile: build.xml does not exist!
> Build failed
> 
> Any clues ?

Ant makes some assumptions about the layout of an installed Java runtime.
There are two ways you can solve this problem with gcj.

1.  If you are building and installing gcc from source, it can
create a JAVA_HOME directory:

`--enable-java-home'
     If enabled, this creates a JPackage compatible SDK environment
     during install.  Note that if -enable-java-home is used,
     -with-arch-directory=ARCH must also be specified.

`--with-arch-directory=ARCH'
     Specifies the name to use for the `jre/lib/ARCH' directory in the
     SDK environment created when -enable-java-home is passed. Typical
     names for this directory include i386, amd64, ia64, etc.

2.  If you are running on a GNU/Linux distro like Fedora, install
the java-1.5.0-gcj package or its equivalent.

Andrew.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-10  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-07 12:59 ant with gcc David Michel
2009-08-10  8:57 ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).