dcsimg
newbie needs help, running ant command from the command prompt but getting error
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Al_n
Posted On:   Thursday, May 12, 2005 12:12 AM

The ant command works only when i run it from the ant in directory in the Command Prompt. I try to run it from my build file directory but I get an error " 'ant' is not recognized as an internal or external command, operavle program or batch file."

Please Help

Re: newbie needs help, running ant command from the command prompt but getting error

Posted By:   Anonymous  
Posted On:   Friday, July 29, 2005 04:44 PM

Make sure you set the Ant_home and path variables in "system variables" instead of one in user and another in system environment.

Re: newbie needs help, running ant command from the command prompt but getting error

Posted By:   Anonymous  
Posted On:   Friday, May 13, 2005 01:35 AM

All OSes I´ve heard from uses PATH environment variable to find executables. If you type "notepad.exe" that file usually is not in your current directory, so Windows searches in the PATH and finds C:WINNT
otepad.exe (or where windows was installed). If you type only notepad windows uses the PATH_EXT variable to find for these file extensions.


You want to type ant so you have to ensure that windows could find the ANT_HOMEinant.bat. PAHT_EXT contains the .bat so that is ok. So you have to add ANT_HOMEin to the PATH-Variable. Here in this context I use ANT_HOME to specify the home directory where you installed Ant. If you specify that directory as environment variable (not necessary for running Ant) you could refer to that when setting set PATH=%PAHT%;%ANT_HOME%in.


If you set the env-vars using set command inside the cmd box, you could use them directly - but only in that cmd box. If you set the env-vars via system configuration, you have to open a new cmd box - like Roseanne said.

Re: newbie needs help, running ant command from the command prompt but getting error

Posted By:   Anonymous  
Posted On:   Thursday, May 12, 2005 06:05 AM

set PATH=%PATH%;%ANT_HOME%in
About | Sitemap | Contact