Hello!
I need to pass args to ant for it to pass them to my main class.
Of course <arg></arg> tags are great.
I've also testes 'ant -Dname=val' syntax.
BUT
1) i have NO name for my attributes (and don't want to create one)
2) my main class needs to treat some args while running, so i need to pass them to ant
and ant pass them to my main.
3) i DON'T know how many args and what args i pass. It depends.
It is often files.
for ex: i pass to my main : java mymain file1 file2 file3 file4
but sometimes there are 6 or 7 files !
So i don't see how to use <arg></arg> in that case.
To make it simpler, what i want to do is to run ant like this :
ant runMyMain file1 file2 ... filen
Then in build, i'm looking for the command to say :
all args are passed to the main file WHATEVER they are and whatever its number is.
so... something like this :
<target name="myexec">
<java classname="packageA.packageB.Main">
<arg line=${*}/> <!-- H E R E -->
<classpath>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
</target>
Is there a way to do this ?
Thanks by advance.
\_O_
| \ Beat
_/ \_
------------------------------------------------------------
[EMAIL PROTECTED] for FREE ! http://www.CannabisMail.com
---------------------------------------------------------------------
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
---------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>