You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by jtnews <jt...@bellatlantic.net> on 2000/09/26 20:57:04 UTC

how to make a classpath like "/java/lib/*.jar"?

is there anything in ant that allows you to expand
all the jar files in a directory into a classpath?

For example,

if I have a.jar, b.jar, c.jar in /java/lib,
how can I make a classpath like 

/java/lib/a.jar:/java/lib/b.jar:/java/lib/c.jar 

without having to specify each jar file manually?

Something equivalent to the Bourne shell

CLASSPATH=`echo /java/lib/*.jar | tr ' ' ':'`

would be really nice!

Re: how to make a classpath like "/java/lib/*.jar"?

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "j" == jtnews  <jt...@bellatlantic.net> writes:

 j> is there anything in ant that allows you to expand all the jar
 j> files in a directory into a classpath?

Not in Ant 1.1 but Ant 1.2 will allow filesets as nested elements
inside a PATH like structure to do exactly this type of thing.

Stefan