When trying to develop unit tests using JUnit 4 and Ant 1.71 in Eclipse 3.6.1, I kept getting this error even though I had added JUnit.jar to the Eclipse buildpath:
The <classpath> for <junit> must include junit.jar if not in Ant's own classpath
The solution was to do the following:
Window -> Preferences -> Ant -> Runtime -> Classpath: Add JUnit.jar to the Global Entries as an external Jar-file.
5.http://book.51cto.com/art/201001/177834.htm
6.http://www.blogjava.net/Man/archive/2010/08/11/ant.html