While building my PhoneGap app (with the Facebook SDK plugin installed), I encountered this error:
BUILD FAILED C:\\adt-bundle-windows-x86_64-201305
Verify your JAVA_HOME variable is correctly set to some path like C:\Program Files\Java\jdk1.7.0_67\ and if the error still goes on, it may be solved going to the build.xml and setting true to the variable fork, or the passed variable ${need.javac.fork}, which sets fork´s value in:
fork="${need.javac.fork}"