db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Been <b...@us.ibm.com>
Subject Re: Build Errors (building Derby under Eclipse)
Date Mon, 17 Jan 2005 14:54:43 GMT
Sorry, I did not read the original post, however two things come to mind:

1) Some plug-ins (Clover) require a JDK and not a JRE, which can be set as 
your default via the menu
         Windows -> Preferences then in the left Pane, Java -> Installed 
Browse to add a JDK and then select it as your default.

2) I have not extensively used Ant in Eclipse, but thought of the Windows 
-> Preferences   Ant -> Runtime settings, and hmmmm, tools.jar is set in 
Global Entries for me (Eclipse 3.0.1).
If it is not in yours, you could also try adding it to Ant's classpath 

Dave Been

Andrew McIntyre <fuzzylogic@sbcglobal.net> 
01/16/2005 08:32 PM
Please respond to
"Derby Discussion"

"Derby Discussion" <derby-user@db.apache.org>

Re: Build Errors (building Derby under Eclipse)

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:

<echo message="**** JVM location ${java.home}" />

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


View raw message