I put junit-4.11.jar to $ANT_HOME/lib folder(I didn't set ANT_HOME environment virable), then I can use
A pitfall here is that Junit depends on hamcrest(see junit website), but if you put hamcrest-core-1.3.jar to $ANT_HOME/lib, there will be a "Class not found" error. It's probably a bug or version matching problem of junit. You have to put hamcrest jar file in "classpath" element of junit task as above.