Hi Shylendran,

The <exec> task has the output and output outputproperty attributes. If
you get your Java program to write the data you need to stdout, the text
will appear there.

Alternatively, you could get your Java program to write a properties file
to the filesystem, and in then later use the Ant <property> task to pick
up the value that way.

Cheers,
Joe

On Thu, March 12, 2009 6:38 am, Shylendran C wrote:
> Hi All,
> Could you please help on this problem???
>
> My requirement is
> In my Java file, I have a method and it will return a value as String. I
> have to get it from ANT script (build.xml) and after that I want to pass
> this to another <target>
>
> *See below code - build.xml*
>
>     <target name="htmlCreation" depends="jar">
>         <java jar="${jar.dir}/HtmlCreation.jar" fork="true"/>
>     </target>
>
>     <target name="main" depends="htmlCreation">
>         <exec executable="${browser}" spawn="true">
>         <arg value="HOW TO GET IT FROM JAVA"/>
>         </exec>
>     </target>
>
>
> Thanks & Regards
> Shylendran.C



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to