This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes ANT not recognisex as internal or external command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ANT not recognisex as internal or external command" Watch "ANT not recognisex as internal or external command" New topic
Author

ANT not recognisex as internal or external command

jaya kemmannu
Ranch Hand

Joined: Sep 23, 2011
Posts: 85

Hi,

I have installed jdk 1.7 version, now when i run ant from the command prompt i get below error.

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

I have set ANT_HOME and JAVA_HOME in my class path as shown below.

ANT_HOME = C:\apache-ant-1.7.0-bin\apache-ant-1.7.0
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_37


C:\Program Files\RA2HP\;C:\oraclexe\app\oracle\product\10.2.0\server\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.6.0_37;C:\apache-ant-1.7.0-bin\apache-ant-1.7.0\;
C:\Program Files\ActivIdentity\ActivClient\;C:\Program Files (x86)\ActivIdentity\ActivClient\


Regards,
Jaya



Vijay Vishwa
Ranch Hand

Joined: Nov 21, 2010
Posts: 32
In the Path environment variable ANT bin folder should also be in the path.
Try adding.
path=%path%;C:\apache-ant-1.7.0-bin\apache-ant-1.7.0\bin;


SCJP 5.0 OCBCD 5.0(Formerly SCBCD)
 
Don't get me started about those stupid light bulbs.
 
subject: ANT not recognisex as internal or external command