‘ant’ is not recognized as an internal or external command, operable program or batch file.

Root cause:

Ant path has not been set. So windows could not recognize ant command.

Solution:

Set the ant path in cmd like this,

Note: Jdk must be installed.

Thanks for reading this post………..!!!

One comment

  • janani

    Thanks a lot…solved my issue

    C:\>ant -version
    ‘ant’ is not recognized as an internal or external command,
    operable program or batch file.

    C:\>ant -version
    ‘ant’ is not recognized as an internal or external command,
    operable program or batch file.

    C:\>set ant_home=C:\apache-ant-1.9.4

    C:\>set path=%path%;%JAVA_HOME%\bin;%ant_home%\bin;

    C:\>ant
    Buildfile: build.xml does not exist!
    Build failed

    C:\>ant -version
    Apache Ant(TM) version 1.9.4 compiled on April 29 2014

    C:\>java -version
    java version “1.8.0_45”
    Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Leave a Reply