ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sim <>
Subject Re: available with classpath
Date Sun, 16 Nov 2008 08:14:15 GMT

I figured it out. Available not only checks if the class exists in the file
but it also checks to see if all of the dependencies of that class are
available as well.

Hope this helps someone else.


sim wrote:
> I am a newbie trying to figure out how the available task can find a
> class.
> The class org.jfree.fonts.LibFontInfo is in the libfonts.jar file
> If I put other pathelement locations into the pathelement, along with the
> libfonts.jar file then it finds the class. If I only put libfonts.jar or
> only the other pathelemenet location then it does not find the class.
> I have tried reading the ant documentation, but I only found the syntax
> and not an explanation of how it works. Can someone explain to me how this
> works or point me to some documentation that is more descriptive. 
> <?xml version="1.0" encoding="UTF-8"?>
> <project default="all" basedir="." name="liblayout" >
>         <property name="newfonts" value="libfonts.jar"></property>
>         <property name="testclass" value="org.jfree.fonts.LibFontInfo" />
>         <available classname="${testclass}"
> property="">
>                 <classpath>
>                         <pathelement location="${newfonts}" />
>                  </classpath>
>         </available>
>         <echo message="NEWFILECLASS=${}" />
> </project>
> Thank you
> Sim

View this message in context:
Sent from the Ant - Users mailing list archive at

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

View raw message