0

I am trying to set up the apache ANT in Windows7 and executed below commands in cmd.

set ANT_HOME=c:\Softwares\apache-ant-1.9
set JAVA_HOME=c:\Softwares\jdk7x64
set PATH=%ANT_HOME%\bin;%JAVA_HOME%\bin;

But, when i execute ant -version command it gives me below error. I cannot set the path from environment variables as i don't have admin rights to do so. How can i do it through command prompt only. What is wrong here ?

Error

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

If i give below command

echo %ANT_HOME%

i get the output as

 c:\Softwares\apache-ant-1.9
user3244519
  • 661
  • 5
  • 18
  • 36
  • You should still be able to set as a user level environment variable without admin permissions, however as pointed out http://stackoverflow.com/questions/21270267/system-versus-user-path-environmental-variable-winmerge-works-only-if-i-add-th if your System level path is too long the user path and system path won't merge – Wardrobe Jul 01 '15 at 14:22

1 Answers1

0

Did you try setting the PATH variable as below?

set PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin;
cs95
  • 379,657
  • 97
  • 704
  • 746
Gautam Jose
  • 686
  • 8
  • 20