ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Rich" <>
Subject RE: Confusion re path-like structures
Date Wed, 09 Mar 2005 16:06:59 GMT
I think it worked the way it should have. I believe what you told it was to
include the C:/Program Files/IBM/SQLLIB/java and the,
db2jcc.jar, and db2jcc_license_cu.jar files from the "base path".

Therefore, when you give it a specific path for the 3 files it finds them.


-----Original Message-----
From: Rhino [] 
Sent: Wednesday, March 09, 2005 7:20 AM
To: ant-user
Subject: Confusion re path-like structures

I'm a bit confused by path-like structures. I wonder if someone can clarify
something for me?

I am trying to revise a 'javac' step that previously only needed one jar on
its classpath so that it can see three jars in the same directory. Based on
the article on path-like structures in the Ant manual, I thought I could do

    <path id="project.class.path">

        <pathelement path="C:/Program Files/IBM/SQLLIB/java"/>

        <pathelement location=""/>

        <pathelement location="db2jcc.jar"/>

        <pathelement location="db2jcc_license_cu.jar"/>


then refer to this structure via a classpathref in javac, like this:

    <javac srcdir="${src.dir}" destdir="${bin.dir}" compiler="modern"



        verbose="no" debug="on" debuglevel="lines,vars,source"

However, when I actually tried it, I couldn't make it work; I got compile
errors that indicated that the jars in the classpath were not visible to the
compiler. I eventually fixed the problem by doing this:

    <property name="jdbc.dir" value="c:/Program Files/IBM/SQLLIB/java"/>
    <path id="project.class.path">

        <pathelement location="${jdbc.dir}/"/>

        <pathelement location="${jdbc.dir}/db2jcc.jar"/>

        <pathelement location="${jdbc.dir}/db2jcc_license_cu.jar"/>


I had the impression from the manual article that 'pathelement path'
represents a directory while 'pathelement location' represents a file within
the directory so that made me think that the first approach would work.

Can anyone explain why it didn't? What am I not understanding about 'path'
and 'location'?

My current approach works fine so I'm happy but I'd like to understand why
the other approach won't work.

rhino1 AT sympatico DOT ca
"There are two ways of constructing a software design. One way is to make it
so simple that there are obviously no deficiencies. And the other way is to
make it so complicated that there are no obvious deficiencies." - C.A.R.

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.6.4 - Release Date: 07/03/2005

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message