ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oisin Kim" <>
Subject RE: Run time commands - a Solution
Date Wed, 17 Apr 2002 15:35:23 GMT
Hi All,

Ok thanks, that's much clearer now, my only apology is that I didn't
make myself clearer from the first email, I was clearly asking the wrong

Just for the benefit of anyone who will need to do something like this
Here's a sample target which will allow user input from or the
running Java application:

<target name="run-with-user-input" depends="build-classes">
<!--build-classes will simply build the classes used by this task-->
    <java classname="org.apache.SomeClassName" >      
      <classpath refid="some.classpath"/> <!--the classpath-->
      <arg value=""/> 	<!--a paramter, a properties
      <arg value="somefilename.txt"/>	<!--a paramter, some file
      <arg value="-mnop"/>			<!--a paramter, passing
options in-->

Since this java command no longer uses the option "fork=true" you can't
define a Path to run java from, everything is run relative to the folder
the Ant build script is contained (if you run Ant from the command line)
in or if you're using something like netbeans, relative to the netbeans
bin directory, although this may be just a config issue! (sorry for the
OT ness of that!)

Hope this helps someone!

Much thanks go to Stefan and Kevin!

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

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

View raw message