How can I use ANT to run a Java application?

How can I use ANT to run a Java application?

The following is an example to run a Java application in using ANT:
<target name=”run” depends=”some.target”,some.other.target”>
<java classname=”${run.class}” fork=”yes”>
<classpath>
<path refrid = “classpath” />
</classpath>
<jvmarg line=”${debug.jvmargs}”/>
<jvmarg line=”${my.jvmargs}”/> < BR>
<jvmarg line=”${run.jvmargs}”/>
<arg line=”${run.args}”/>
</java>
</target>
Explain how to debug my ANT script
Explain how to debug my ANT script - Ant script can be debugged in the following ways: By echoing at the place to debug. The problem is easily known. This is similar to printf () function in C and System.out.println() in Java....
How can I write my own ANT task?
How can I write my own ANT task? - Define the user defined custom script and use taskdef to define in the custom script.....
Explain how to use ANT-contrib tasks
Explain how to use ANT-contrib tasks - Copy the ant-contrib.jar to the directory ant*/lib. Copy ant-contrib.jar to your ant*/lib directory.
....
Post your comment