Search code examples
antclasspathjavacjava-6

Using JDK 6 style classpath with javac ANT compile task


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

  • 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.