aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes ANT_HOME variable for Windows XP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ANT_HOME variable for Windows XP" Watch "ANT_HOME variable for Windows XP" New topic
Author

ANT_HOME variable for Windows XP

Venkatesh Kumar
Ranch Hand

Joined: Aug 08, 2003
Posts: 68
Hi,
Im a newbie to ant .I was trying to follow the instruction sun j2ee 1.3 tutorial.THE O/S I am using is windows XP
ANT is installed in c:\unzipped
and i am setting ANT_HOME to c:\unzipped but still I am getting an error which says ANT_HOME set incoorectly or not able to find ant.
PLEASE HELP!!!
Peter Storch
Ranch Hand

Joined: Jun 12, 2003
Posts: 74
Hi,
I don't need to mention that c:\unzipped is a bad location for ANT.

Where did you set the ANT_HOME variable?
You should set it in your windows control panel in the environment variables tab.
If you have an open command window you have to close and reopen it.
Venkatesh Kumar
Ranch Hand

Joined: Aug 08, 2003
Posts: 68
Hi Peter Storch ,
Thanks for your response.I did set the ANT_HOME using control panel but it is still giving the same error.
Hemanth
Peter Storch
Ranch Hand

Joined: Jun 12, 2003
Posts: 74
can you check if "echo %ANT_HOME%" gives you the correct path?
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

You need to add '%ANT_HOME%\bin' to your PATH
Rene


Regards, Rene Larsen
Dropbox Invite
Greg Schultz
Greenhorn

Joined: Oct 08, 2003
Posts: 16
When you set ANT_HOME in the Environment settings, did you set it for your User Variables or as a System Variable?
Try both of them and see if that works.
Gary VanMatre
Greenhorn

Joined: Sep 26, 2003
Posts: 6
You might be missing your %ANT_HOME%\lib\ant.jar. I used WinXP to extract the ant-1.6.3 archive and for whatever reason it didn't extract all of the lib folder. I just use the win explorer to drill into the archive and copy and past the jar files. Weird..
Mohan G Kumar
Greenhorn

Joined: Feb 17, 2007
Posts: 5
The same problem i faced. Do not set ANT_HOME. Delete that ant home. Set or add entry to PATH variable <your and home>\bin. Now it will work. Can antbody help me in required set up's and bulid.xml to send mail after the build. Thanks in Advance.........


Mohan G Kumar<br />SCJP(76%), SCWCD(91%), Preparing for SCBCD..
prabhu pandurangan
Ranch Hand

Joined: May 23, 2008
Posts: 132
@Mohan

I am also facing this issue. I am not clear with what you say:

'Set or add entry to PATH variable <your and home>\bin.'

Please let me know in detail.
ashik chollangi
Greenhorn

Joined: Jun 06, 2008
Posts: 15
Hey guys,set ANT_HOME to the C:\apache-ant-1.7.1\bin and then add C:\apache-ant-1.7.1\bin;%ANT_HOME%\bin in path ..then it works....

and also I recommned ot to use this way..this way is just to make projects without eclipse ...Use eclipse guys there is no need for this additional work..


Im 4 Java
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

ashik chollangi wrote:Hey guys,set ANT_HOME to the C:\apache-ant-1.7.1\bin and then add C:\apache-ant-1.7.1\bin;%ANT_HOME%\bin in path ..then it works....

and also I recommned ot to use this way..this way is just to make projects without eclipse ...Use eclipse guys there is no need for this additional work..


Actually, Eclipse isn't nearly as flexible as Ant (or Maven) at building complex projects. So I often use Ant inside Eclipse.

But I seriously recommend that any good project be buildable without using an IDE, even if it's just an option. I've been burned too many times where I couldn't do a build because either my IDE was the wrong version or because it didn't have exactly the same desktop settings as someone else's IDE. Batch builds are less tempermental. Plus they can run on non-gui machines.


Customer surveys are for companies who didn't pay proper attention to begin with.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Wow, a 6-year old zombie...

Anyway, in case someone else trips over this in the future, this advice is incorrect:

set ANT_HOME to the C:\apache-ant-1.7.1\bin


For this example, ANT_HOME should be set to C:\apache-ant-1.7.1 (leave off "\bin").


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ANT_HOME variable for Windows XP