This post is for future generations...
After a couple of months oа quite stable work my Ant script has started to fail with the following error
[javac] Unrecognized option: -J-Xmx256m
[javac] Could not create the Java virtual machine.
After digging up through a few links (there were not more then a dozen google could find) asking on a couple of forums for any clues on that mystery I was almost sure I would never find how to rectify that error. But finally I got it myself. The problem was that my build.properties file has this:
javac.executable="C:/j2sdk1.4.2_08/bin/java.exe"
instead of this
javac.executable="C:/j2sdk1.4.2_08/bin/javac.exe" - note
javac not
java
Well, thats pretty much of my problem that was successfully resolved