If the number of arguments is known you can use the -D option to pass in the argument and then in your "run" task target use 'arg' to pass it to jar file like
<target name="run" depends="jar">
<java jar="${jar.dir}/${ant.project.name}.jar" fork="true">
<arg value="${arg1}"/>
<arg value="${arg2}"/>
<arg value="${arg3}"/>
<arg value="${arg4}"/>
<arg value="${arg5}"/>
</java>
</target>
and you should invoke your ant file as
ant -Darg1=1 -Darg2=2 -Darg3=3 -Darg4=4 -Darg5=5