ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <>
Subject Re: Call a class with params from ANT
Date Thu, 06 May 2004 08:15:40 GMT
Hello Milan,

Here is a real snippet of invoking class via ant
fork="yes" failonerror="true">
                <path refid="project.classpath"/>
                <path refid="test.classpath"/>
            <arg file="${test.output.file}"/>

This class requires two parameters which I pass them
to the class with <arg> attribute of <javac> task. All
other attribues this snippet is using are described

Hope this helps

P.S. You can run with java command and hence with ant
<java> task only classes that have main method. You
are mentioning that your class' contrucor requires 2
params. So you must pass the two params to the main
method and you call the constructor with them. I
suppose you know this and i explain it just in case
--- wrote:
> Hello,
> 	I'm a beginner with Java and using ANT ... and have
> a problem how to call a class with params - is it
> possible with ANT tasks? Or have I  to create my own
> task? The constructor of the class needs 2
> parameters.
> Could somebody tell me where can I find any info
> about it?
> Thanx for your answers.
> 	Milan
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message