0
votes

Does anybody have an example of using JDK 6 style - only defining the directory and not list of each and every jar in the directory - classpath with an ANT javac compile task?

We tried it like this

compile.classpath=c:....\WEB-INF\lib*;...websphere...\a.jar;...websphere...\b.jar; etc. and used this classpath in the javac task, but the libraries from WEB-INF\lib were not being recognised.

So, I am wondering if it is possible to use this type of construct with ANT. The ANT version is 1.8.4.

2

2 Answers

0
votes

Typically we use path like structures .

<path id="project.classpath">
   <fileset dir="${libdirectory}">
       <include name="*.jar"/>
   </fileset>
</path>

The the project.classpath is used in javac task. See more at ant examples

0
votes

I do not yet know, why this works vs. why it doesn't work without these attributes, but I was able to get the wildcard part to work by using the fork="yes" and executable="path-to-my-executable" attributes in the javac task.