Using JDK 6 style classpath with javac ANT compile task
Question
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.
Solution 2
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.
OTHER TIPS
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