You can use the <fileset> element to define a path:

<path id="sab.classpath">
    <fileset dir="${resc}"/>
</path>

You can limit files inside the <fileset> directive too using <include>
and <exclude>:

<path id="sab.classpath">
    <fileset dir="${resc}">
        <include name="*.jar"/>
        <include name="*.zip"/>
        <exclude name="bad.jar"/>
    </fileset>
</path>

The great advantage of this is that you can easily add new jars to
your classpath by simply adding jar files into that directory.


On 8/7/07, Manivannan Palanichamy <[EMAIL PROTECTED]> wrote:
> Hi,
> Actually, I add the jar files in classpath using the following way.
>    <path id="sab.classpath">
>       <pathelement location="${resc}/mysql-connector-java-3.1.12-bin.jar"/>
>       <pathelement location="${resc}/activation.jar"/>
>       <pathelement location="${resc}/imap.jar"/>
>    </path>
>
> It looks bit tedious, since every jar file should be listed in the
> pathelement tag. Instead of doing this, is there anyway to specify a
> directory, containing all jar files?
>
> --
> Manivannan.Palanichamy (@) Oracle.com
> http://mani.gw.googlepages.com/index.html
>


-- 
--
David Weintraub
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to