<project basedir="." default="run">
<!-- Cleans the working folders-->
<target name="clean">
<delete dir="build"/>
</target>
<!-- Compiles the source code (.java files)-->
<target name="compile" depends="clean">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes"/>
</target>
<!-- Creates the jar file -->
<target name="jar" depends="compile">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/HelloWorld.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="com.goodrich.GoodrichApp"/>
</manifest>
</jar>
</target>
<!-- Executes the jar file -->
<target name="run" depends="jar">
<java jar="build/jar/HelloWorld.jar" fork="true"/>
</target>
</project>Dear All,
Please copy this file on desktop.
Regards,
Vivek Mehta
No comments:
Post a Comment