ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <>
Subject Re: Adding specific jar to classpath
Date Tue, 24 Mar 2009 14:15:18 GMT
So, you already have a classpath defined, and you just want to add an
additional JAR to it?

If you have that path as a property:

<path id="new.classpath">
     <pathelement path="${old.classpath}"/>
     <pathelement location="${additional.jar}"/>

If you have that previous path as a reference:

<path id="new.classpath">
    <path refid="old.classpath"/>
    <pathelement location="${additional.jar}"/>

Or, you can cheat (For example, this is for a <javac> task):


Note that the colon in the value for "classpath" will convert over to
a semicolon on Windows systems.

On Mon, Mar 23, 2009 at 6:14 PM, eyalg1972 <> wrote:
> Hi,
> Does anyone knows how to add a specific jar to the classpath?
> I know that there is a property- additional.classpath, but I don't know how
> to use it...
> Eyal
> --
> View this message in context:
> Sent from the Ant - Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

David Weintraub

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

View raw message