As the documentation says, the command parameter is deprecated, the
executable parameter should be used and in NO case both of them.

I usually start batch jobs like below, I'm not sure if this is the best way,
but it works ;-)

        <exec executable="cmd" dir="<directory>" >
                <arg line="/c batch.bat <parameters>" />
        </exec>

In your case, you want to execute a class from a jar file, so the <java>
task would be more appropriate.

Klaus


> -----Original Message-----
> From: Guruprasad R [mailto:[EMAIL PROTECTED] 
> Sent: 18 January, 2006 13:41
> To: Ant Users List
> Subject: command execution
> 
> I am using ant on my Windows 2000 OS. I want to execute a 
> command "java weblogic.ejbc npacejb.jar" from a particular 
> directory in the command prompt using ANT. i have written the 
> script as below. I am not sure whether i have written the 
> script properly.
> 
>  <target name="exectask" depends="makejar">
>   <exec executable="cmd" os="Windows 2000" command="/c java 
> weblogic.ejbc npacejb.jar">
>    <arg line="${src}/classes"/>
>   </exec>
> 
> i am getting a message as "Please use the executable 
> attribute and nested arg elements." how do i do this? Please help.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to