Ant command line arguments

Posted by js7354 on Stack Overflow See other posts from Stack Overflow or by js7354
Published on 2012-11-19T04:44:26Z Indexed on 2012/11/19 5:00 UTC
Read the original article Hit count: 117

Filed under:
|

Program works fine when run with eclipse run configurations, but when run with ant, it is unable to parse int from args[0], which I do not understand. Full code is available here https://gist.github.com/4108950/e984a581d5e9de889eaf0c8faf0e57752e825a97 I believe it has something to do with ant,

target name="run" description="run the project">
   java dir="${build.dir}" classname="BinarySearchTree" fork="yes">
    <arg value="6 in.txt"/>
   /java>
/target>

the arg value will be changed via the -D flag, as in ant -Dargs="6 testData1.txt" run.

Any help would be much appreciated, it is very frustrating.

© Stack Overflow or respective owner

Related posts about java

Related posts about ant