ant.bat: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/lib64/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/ant.bat - from package: eclipse-platform

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/lib/eclipse/plugins/org.apache.ant_1.8.3.v20120321-1730/bin/ant.bat - from package: eclipse-platform-data
/usr/share/eclipse/plugins/org.apache.ant_1.8.3.v20120321-1730/bin/ant.bat - from package: eclipse-platform-data

You may install the required package with command apt-get install {package}
Error in other languages:
ant.bat: bevel nie gevind nie
ant.bat: comandă negăsită
ant.bat: comando não encontrado
ant.bat: commande introuvable
ant.bat: command not found
ant.bat: käsku ei ole
ant.bat: không tìm thấy lệnh
ant.bat: komanda nerasta
ant.bat: Kommando nicht gefunden.
ant.bat: kommandot finns inte
ant.bat: komut yok
ant.bat: nie znaleziono polecenia
ant.bat: níor aimsíodh an t-ordú
ant.bat: no se encontró la orden
ant.bat: no s'ha trobat l'ordre
ant.bat: opdracht niet gevonden
ant.bat: parancs nem található
ant.bat: perintah tidak ditemukan
ant.bat: príkaz nenájdený
ant.bat: příkaz nenalezen
ant.bat: команда не найдена
ant.bat: командата не е открита
ant.bat: 命令找不到
ant.bat: コマンドが見つかりません