by @kodeazy
ant is not recognized as an internal or external command operable program or batch file.
- I have downloaded the ant and tried to execute
ant -version
command to check theant
version but got the below error. - To solve the error followed the below steps.
- Opened the
Environment Variable
and added the path ofant downloaded software
by creatingnew variable
as shown in below screenshot. variable name
: ANT_HOMEvariable value
:C:\Program Files\softwares\apache-ant-1.10.12\- Refer to below screenshot for clear view
-
Now edited the path variable and added the path as below.
%ANT_HOME%\bin
- Refer to below screenshot
- Now after closing the environment variable try executing
ant-version
by opening the command prompt.