1.

How Do I Get Started To Use Ant? Can You Give Me A "hello World" Ant Script?

Answer»

Simple.
* Download the most recent version of ant from Apache; unzip it some where on your machine.
* Install j2sdk 1.4 or above.
* Set JAVA_HOME and ANT_HOME to the directory your installed them respectively.
* Put %JAVA_HOME%/BIN;%ANT_HOME%/bin on your PATH. Use ${JAVA_HOME}/bin:${ANT_HOME}/bin on UNIX. Yes, you can use forward slash on windows.
* WRITE a "Hello world" build.xml

<project name="hello" default="say.hello" basedir="." >
<property name="hello.msg" value="Hello, World!" />
<TARGET name="say.hello" >
<echo>${hello.msg}</echo>
</target>
</project>

* Type ant in the directory your build.xml located.
* You are ready to go!!!! 

Simple.
* Download the most recent version of ant from Apache; unzip it some where on your machine.
* Install j2sdk 1.4 or above.
* Set JAVA_HOME and ANT_HOME to the directory your installed them respectively.
* Put %JAVA_HOME%/bin;%ANT_HOME%/bin on your Path. Use ${JAVA_HOME}/bin:${ANT_HOME}/bin on UNIX. Yes, you can use forward slash on windows.
* Write a "Hello world" build.xml

<project name="hello" default="say.hello" basedir="." >
<property name="hello.msg" value="Hello, World!" />
<target name="say.hello" >
<echo>${hello.msg}</echo>
</target>
</project>

* Type ant in the directory your build.xml located.
* You are ready to go!!!! 



Discussion

No Comment Found