Build on Java 6 with ant

commit 048a249 and 7645739 are compiling fixes
commit d528388 is an ant build file

(sorry I'm not familiar with this site, I'm not sure whether you can pick up some of my commits 
or you have to merge all from mine)