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



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="class.new.file.exists">
>                 <classpath>
>                         <pathelement location="${newfonts}" />
>                  </classpath>
>         </available>
>         <echo message="NEWFILECLASS=${class.new.file.exists}" />
> </project>
> 
> Thank you
> Sim
> 

-- 
View this message in context: 
http://www.nabble.com/available-with-classpath-tp20441098p20523270.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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

Reply via email to