db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Irum Godil <softwarengineer2...@yahoo.com>
Subject Re: Build Errors (building Derby under Eclipse)
Date Mon, 17 Jan 2005 17:51:10 GMT
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. 

Andrew McIntyre <fuzzylogic@sbcglobal.net> wrote:
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 

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 

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

Version: GnuPG v1.2.4 (Darwin)


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