ant编译简单说明

<project name="MyProject" default="compile" basedir=".">
<description>
simple example build file
</description>
<!-- set global properties for this build -->
<property name=
"src" location="src"
/>
<property name=
"build" location="build"
/>

<target name=
"init"
>
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir=
"${build}"
/>
</target>

<target name=
"compile" depends="init"

description=
"compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir=
"${src}" destdir="${build}"
/>
</target>
</project>



1其中的src和build是两个??件夹中
3进入cmd系统下达到%ANT_HOME%\bin\下
如:
f:\ant\bin>
直接键入ant就行了
f:\ant\bin>ant

出现BUILD SUCCESSFUL

注意:当程序中用到第三方包(不是jdk中自带的包),只要包这些包扔到%ANT_HOME%\lib下就
OK了



当然ANT远不止编译java程序的功能,她还能打成jar包(都能非常的节约时间)
这算是学习ant的第一课吧:编译

你可能感兴趣的:(jdk,ant,F#)