Thanks! that makes perfect sense and helped me solve the problem:
The property is set here:
It did have something to do with classpath as IntelliJ's ANT gets its
junit via its own classpath (it uses ant-junit.jar from C:\Program Files (x86)\JetBrains\IntelliJ IDEA 10.5.4\lib\ant\lib
and that jar has no such thing as framework.Test )
my command line ant had access via my system classpath to junit.jar which does have a junit.framework.Test
So, once I put junit.jar into ANT's classpath (a different thing than intelliJ's classpath or project libraries) it started working
Now that I learned the reason, I see that the ant documentation says clearly that junit.jar must be in classpath in addition to ant-junit.jar:
http://ant.apache.org/manual/Tasks/junit.html