ant.cmd: 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.cmd - 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.cmd - from package: eclipse-platform-data
/usr/share/eclipse/plugins/org.apache.ant_1.8.3.v20120321-1730/bin/ant.cmd - from package: eclipse-platform-data

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