日期:2014-05-17  浏览次数:20732 次

Apache Ant安装与配置
1,下载Apache ant
url: http://ant.apache.org/bindownload.cgi

2,解压到你想放置的盘符
e.g.:\Program Files\ant\apache-ant-1.8.1
    
3,配置环境变量
变量: ANT_HOME
值: 你刚解压到的路径: D:\Program Files\ant\apache-ant-1.8.1
设置Path: %ANT_HOME%\bin

     
到止,ANT就是安装完成了,运行cmd,输入ANT,如果没有指定build.xml就会输出:
Buildfile: build.xml does not exist!
Build failed
如:
C:\Documents and Settings\Administrator>ant
Buildfile: build.xml does not exist!
Build failed

安装成功.
     如果,安装到上面,输入ANT后,提示 Unable to locate tools.jar   这是因为没有安装JDK引起的,ANT需要在JDK环境下有效运行,OK,下边就安装JDK。