First you could try to use bundled jre by removing JAVA_HOME system variable.
Also try to execute ant with debug flag. It might tell what is wrong. Also are you sure there are no access right problems? Like if you extracted the package as root and running it as non-root user...
./installer-4.2.0-EE/bin/ant --execdebug
Edit: You have community version, so check the path to ant