Sign in to follow this  

Ants!!

This topic is 2633 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im having the hardest time seeting up Ant.
What I have done so far:

Downloaded Ant version 1.8.1.
Extracted it to my c: drive and renamed it ant (located at "C:\ant").
Went to Enviornment Variables.
Made a new user variable called "ANT_HOME".
Set that variable to "C:\ant".
Made a new user variable called "JAVA_HOME".
Set that variable to "C:\Program Files\Java\jdk1.6.0_21".
Made a new system variable called "path".
Set that variable to "C:\Program Files\Java\jdk1.6.0_21\bin;%ANT_HOME%\bin".

Clicked Okay. Clicked Apply.

Then I opened command promopt and typed in "ant" or "ant.bat", and always got this:

ant/ant.bat is not reconized as an internal or external command, operable program,
or batch file.

Now i'm clueless what to do, any help?
Thanks!

Share this post


Link to post
Share on other sites
I haven't used Ant before, but the first thing i would suggest is making sure that batch file can be found in the path.

When you type "ant.bat" into the command line, Windows will search the paths for a file called "ant.bat". The error mentions a file called "ant/ant.bat", so perhaps "ant.bat" calls another batch file in a subfolder called "ant". And maybe that sub folder doesn't exist
Sorry, by "ant/ant.bat" you mean "ant OR ant.bat" don't you? I thought you were referring to a path, i.e. ".\ant\ant.bat"

Share this post


Link to post
Share on other sites
Depending on what I typed in, the error displays something different.

For example, if I type ant.bat in the command prompt it will display:
"ant.bat is not reconized as an internal or external command, operable program,
or batch file."

Ive messed with my paths in ANT_HOME, JAVA_HOME, and path, so many different ways and I cant figure out my problem. Why windows does not reconizing ant at all.

Share this post


Link to post
Share on other sites
Quote:
Original post by wittler55
Made a new system variable called "path".
Set that variable to "C:\Program Files\Java\jdk1.6.0_21\bin;%ANT_HOME%\bin".


You should have already had a variable called "Path" or "PATH". You should append those entries to the existing variable, and delete the one you made.

Also, if you have a command prompt open while you're doing this, you'll need to close it and open it again for the changes to take effect.

After that, in the command prompt type 'ant', not 'ant.bat', and you should get some ant-related output.

Share this post


Link to post
Share on other sites
I am pretty sure I did have a path variable, but I screwed it up by deleting everything inside it and putting just the input that I put inside it, posted above. Is there anyway to reset it? Reinstalling Java or should I result in wiping my computer completely. Im not really sure what envoirnment variables are really used for anyway. I'll have to do some research.

Share this post


Link to post
Share on other sites
Quote:
Original post by wittler55
I am pretty sure I did have a path variable, but I screwed it up by deleting everything inside it and putting just the input that I put inside it, posted above. Is there anyway to reset it?


Depends on what operating system you have. Google for something like "restoring path variable" or "restoring environment variables". Some options I've seen are to do a system restore, or to try the solution from here.

Share this post


Link to post
Share on other sites

This topic is 2633 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this