Hi Andrew,
 
Yes you are right. Eclipse is looking for tools.jar in a different directory vs. the command line. The program build after I copied tools.jar in the right place.
 
Thanks.

Andrew McIntyre <[EMAIL PROTECTED]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Jan 16, 2005, at 9:42 AM, Irum Godil wrote:

> It seems to me that the Eclipse classpath file has no effect on
> build.xml or the ant building. It is picking up its files from
> somewhere else completely.

I think I know what is going on here. I think the java executable that
runs Ant from Eclipse is from a JRE installation instead of a JDK
installation.

For tools.jar for the taglet build, Ant tries to pick it up from the
JDK relative to the setting of the Java system property java.home, to
avoid having to make a copy of the JDK's tools.jar to another location.
On most systems, java.home is set to the *jre* directory of the JDK
installation. So, relative to this directory, tools.jar is in
${java.home}/../lib/tools.jar.

However, if Ant is running from a JRE installation instead of a JDK
installation, this directory will not exist. If you add the -verbose
property to the Ant command line (inside Eclipse) and capture the
output, the 4th line of the output will give you the location of the
java.home. Once you know the location of java.home, you can copy
tools.jar to where the build expects it to be (${java.home}/../lib).

You could also find the location of java.home in a similar method as
ant.java.version, with the following tag:



> I also tried copying the tools.jar file inside:
> $derbysource\tools\java file where the other jar files exist, but no
> luck there too.

If you are still unable to progress, another workaround would be to
change java/build/org/apache/derbyBuild/build.xml, line 35, to point to
a known copy of tools.jar

andrew
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFB6zHkDfB0XauCH7wRAqmFAKCdKC1iRT4mKbsThu+O7KDdOF0QiACeLifE
lAq1waDajOpG1FpYlRGZ1Zw=
=5JKB
-----END PGP SIGNATURE-----


Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.

Reply via email to