Build.xml to run a JAR file
<project name="MyProject" default="all" basedir="."> <property name="jarfile" value="Sample.jar" description="JAR Folder" /> <target name="runJar" description="execute jar"> <java jar="${jarfile}.jar" fork="true"/> </target> <target name="all" depends="runJar"> <echo message="Build complete." /> </target> </project>
Build.xml to run a JAR file which has arguments
<project name="MyProject" default="all" basedir="."> <property name="jarfile" value="Sample.jar" description="JAR Folder" /> <target name="runJar" description="execute jar"> <java jar="${jarfile}.jar" fork="true">
<!-- Pass Arguments Here -->
<arg line="${arg1}"/>
<arg line="${arg2}"/>
</java>
</target>
<target name="all" depends="runJar">
<echo message="Build complete." />
</target>
</project>
No comments:
Post a Comment