1.在E:\学习笔记\Ant,建立build.xml文件,内容:
<?xml version="1.0" encoding="gb2312" ?>
<project name ="projectStudy" default ="sayBaseDir" >
<target name ="sayBaseDir">
<echo message ="The base dir is: ${basedir}"/>
</target>
</project>
2.进入dos,cd到目录:E:\学习笔记\Ant下,运行ant sayBaseDir,输出成功
注意(<?xml version="1.0" encoding="gb2312" ?> 中,不能有空格,否则报异常
The processing instruction must begin with the name of the target)