You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by si...@insession.com on 2005/04/14 02:00:39 UTC
Re: Build Errors (building Derby under Eclipse)
"Jean T. Anderson" <jt...@bristowhill.com> wrote on 18/01/2005 06:25:03 AM:
> Irum Godil wrote:
>
> > 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.
> ...
>
>
> Before everyone forgets this problem, I'd like to attempt to summarize
> how to build Derby with Eclipse on Windows with information from these
> messages from Rajesh and Andrew:
>
> http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=derby-
> user@db.apache.org&msgNo=519
> http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=derby-
> user@db.apache.org&msgNo=547
>
> 1) Setup everything as per the Derby build doc "How to build Derby"
> section at http://incubator.apache.org/derby/derby_downloads.html. If
> you can build Derby from the command line, you're ready to set up
Eclipse.
>
> 2) Derby uses jdk14 and jdk13 for its builds. So using the default
> Eclipse building (which uses only one jdk ) may not a good idea.
>
> un-check the Preferences for auto building.
> Window - Preferences - Workbench - Build automatically
> Window - Preferences - Run/Debug - Launching - Build (if required)
> before launching
>
> 3) The rest of these instructions assume that you checked out the Derby
> 10.0 codeline in this subdirectory:
>
> C:\derby10_0\10.0
>
> svn co
> http://svn.apache.org/repos/asf/incubator/derby/code/branches/10.0/
>
> 4) The Eclipse project workspace is pointed to C:\derby10_0, if you try
> creating a project with the same name '10.0' as above Eclipse identifies
> the all the required subdirectories including the sources and the
> classes (will take some time) since the checked out Derby 10.0 has same
> name.
>
> 5) Setup Eclipse to recognize the 'classes' directory as the output
folder.
>
> Right click on the build.xml (most external) - Run - the first
'Ant
> Build' uses the default "buildsource"
>
> The second 'Ant Build' gives you the choices of the ant target.
>
> 6) The java executable that runs Ant from Eclipse needs to be able to
> find the JDK tools.jar file -- and it might not be able to find it if
> Ant is running from a JRE installation.
>
> For the taglet build, Ant tries to pick tools.jar 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).
Rather than copying the tools.jar file (as discussed in the paragraph
above), you can do the following (tested on eclipse 3.1M6):
a) Right click on the build.xml file.
b) Select "Run As..." -> "2 Ant Build ..."
c) Click on the "JRE" tab
d) Select the "Separate JRE" radio button
e) Click the "Installed JREs..." button
f) Click Add (We are going to add a JRE entry that is actually going to
point to the JDK)
g) In the "JRE name" field, specify something like "JDK1.4.2_06"
h) In the "JRE home directory " field, specify the JDK directory, e.g.
"C:\j2sdk1.4.2_06"
i) Click OK
j) Click OK
h) Click Apply
Hope it works for others..
John.
>
>
> Corrections? Additions? When we have it "right", I'll add a link to the
> instructions from the Derby FAQ.
>
> thanks!
>
> -jean
>
>
>
This e-mail message and any attachments may contain confidential,
proprietary or non-public information. This information is intended
solely for the designated recipient(s). If an addressing or transmission
error has misdirected this e-mail, please notify the sender immediately
and destroy this e-mail. Any review, dissemination, use or reliance upon
this information by unintended recipients is prohibited. Any opinions
expressed in this e-mail are those of the author personally.
Re: Build Errors (building Derby under Eclipse)
Posted by si...@insession.com.
sissonj@insession.com wrote on 14/04/2005 10:00:39 AM:
Missed an additional step required between steps i & j in my instructions.
See below for details..
> "Jean T. Anderson" <jt...@bristowhill.com> wrote on 18/01/2005 06:25:03
AM:
>
> > Irum Godil wrote:
> >
> > > 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.
> > ...
> >
> >
> > Before everyone forgets this problem, I'd like to attempt to summarize
> > how to build Derby with Eclipse on Windows with information from these
> > messages from Rajesh and Andrew:
> >
> > http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=derby-
> > user@db.apache.org&msgNo=519
> > http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=derby-
> > user@db.apache.org&msgNo=547
> >
> > 1) Setup everything as per the Derby build doc "How to build Derby"
> > section at http://incubator.apache.org/derby/derby_downloads.html. If
> > you can build Derby from the command line, you're ready to set up
> Eclipse.
> >
> > 2) Derby uses jdk14 and jdk13 for its builds. So using the default
> > Eclipse building (which uses only one jdk ) may not a good idea.
> >
> > un-check the Preferences for auto building.
> > Window - Preferences - Workbench - Build automatically
> > Window - Preferences - Run/Debug - Launching - Build (if required)
> > before launching
> >
> > 3) The rest of these instructions assume that you checked out the
Derby
> > 10.0 codeline in this subdirectory:
> >
> > C:\derby10_0\10.0
> >
> > svn co
> > http://svn.apache.org/repos/asf/incubator/derby/code/branches/10.0/
> >
> > 4) The Eclipse project workspace is pointed to C:\derby10_0, if you
try
>
> > creating a project with the same name '10.0' as above Eclipse
identifies
>
> > the all the required subdirectories including the sources and the
> > classes (will take some time) since the checked out Derby 10.0 has
same
> > name.
> >
> > 5) Setup Eclipse to recognize the 'classes' directory as the output
> folder.
> >
> > Right click on the build.xml (most external) - Run - the first
> 'Ant
> > Build' uses the default "buildsource"
> >
> > The second 'Ant Build' gives you the choices of the ant target.
> >
> > 6) The java executable that runs Ant from Eclipse needs to be able to
> > find the JDK tools.jar file -- and it might not be able to find it if
> > Ant is running from a JRE installation.
> >
> > For the taglet build, Ant tries to pick tools.jar 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).
>
> Rather than copying the tools.jar file (as discussed in the paragraph
> above), you can do the following (tested on eclipse 3.1M6):
>
> a) Right click on the build.xml file.
> b) Select "Run As..." -> "2 Ant Build ..."
> c) Click on the "JRE" tab
> d) Select the "Separate JRE" radio button
> e) Click the "Installed JREs..." button
> f) Click Add (We are going to add a JRE entry that is actually going to
> point to the JDK)
> g) In the "JRE name" field, specify something like "JDK1.4.2_06"
> h) In the "JRE home directory " field, specify the JDK directory, e.g.
> "C:\j2sdk1.4.2_06"
> i) Click OK
Pull down the list of JREs (on the right of the "Separate JRE" radio
button) and select the JRE config you just created (the one pointing to
the JDK).
> j) Click OK
> h) Click Apply
>
> Hope it works for others..
>
> John.
>
> >
> >
> > Corrections? Additions? When we have it "right", I'll add a link to
the
> > instructions from the Derby FAQ.
> >
> > thanks!
> >
> > -jean
> >
> >
> >
>
> This e-mail message and any attachments may contain confidential,
> proprietary or non-public information. This information is intended
> solely for the designated recipient(s). If an addressing or
transmission
> error has misdirected this e-mail, please notify the sender immediately
> and destroy this e-mail. Any review, dissemination, use or reliance
upon
> this information by unintended recipients is prohibited. Any opinions
> expressed in this e-mail are those of the author personally.