>Reply-To: "Ant Users List" <[EMAIL PROTECTED]>
>Date: Mon, 11 Mar 2002 07:56:30 -0800 (PST)
> Diane Holt <[EMAIL PROTECTED]> Re: passing $* from shell to ant Ant Users List
><[EMAIL PROTECTED]>
>--- Beat Mr Beat je vous prie <[EMAIL PROTECTED]> wrote:
>> 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.
>
>Try 'ant -Dargs="file1 file2 ... filen" myexec', not a -D for each arg.
>
>> 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>
>
>And change "${*}" to "${args}".
>
>Diane
>
>=====
>([EMAIL PROTECTED])
>
>
>
I still have trouble.
command :
ant myexec -Dargs="~/logs/helloClient_Ctrace.xml"
My error message :
/home/promo-2002/parradel/CorbaTrace/build.xml:93: java.lang.LinkageError: loader
constraints violated when linking org/xml/sax/Parser class
where line 93 is <java classname="mypackage.Main">
and whole task is :
<target name="myexec">
<java classname="mypackage.Main">
<arg line="${args}"/>
<classpath>
<pathelement location="${jar}"/>
<pathelement path="${java.class.path}"/>
<pathelement path="${parserSax}"/>
</classpath>
</java>
</target>
Any idea ?
\_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]>