i got this error when i ran ant with verbose switch (ant -v dist)
Their are different solution provided on internet for this error.
In my case they didn't work.
In my case problem was my ant home is too long.
eg.
C:\Users\Administrator\salesforce\src_main_013700_8467\apache-ant-1.9.0
when i places ant to smaller path it fixed the problem
C:\apache-ant-1.9.0