I'm setting up a classpath for a forked <java>. I understand how Ant wildcards work. I was previously using ant wildcards to define the classpath, but the cmd line exceeds the windows limit when ${srclib} is deep.
<fileset dir="${srclib}"> <include name="*/*.jar"/> I want the classpath to include the literal string "wnc/*", which is a valid java classpath element. Since I used "pathelement path", shouldn't it take this as a literal? I think it does, except that it appears to validating it, and throwing it out as non-existent. I would expect this validation with "pathelement location", but not "pathelement path". Thanks, Mike -----Original Message----- From: jan.mate...@rzf.fin-nrw.de [mailto:jan.mate...@rzf.fin-nrw.de] Sent: Thursday, February 26, 2009 12:02 AM To: user@ant.apache.org Subject: AW: Classpath Wildcards >I'm trying to use Java's Classpath wildcards to limit the cmd length on >forked java calls. > > <pathelement path="${srclib}/wnc/*"/> That's not a Java wildcard, it's an Ant wildcard. Because <pathelement> is an Ant construct and Java wildcard can only be used from the command line. >But, Ant is throwing it out. > dropping L:\Windchill\srclib\wnc\* from path as it doesn't exist > [java] Executing 'D:\programs\jdk1.6.0_10\jre\bin\java.exe' with arguments: >Is there any way to do this? Ant doesnt pass all found classfiles to the program - it sets up a classloader. Therefore it can handle large numbers of files itself. So use an Ant wildcard: <pathelement path="${srclib}/wnc/**"/> (add one star ;) '*' every file in the directory '**' every file somewhere under the directory Jan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org