title: return exit code from ant to a batch file
body: <p>I have several ant tasks in my .bat file to execute.<br/>
  My .bat file is like below:<br/></p>
  
  <blockquote>
    <p>call ant -buildfile task.xml target1<br/>
    call ant -buildfile task.xml target2</p>
  </blockquote>
  
  <p>For each ant task, it will execute a java program and the program will return an exit code by using <i>System.exit()</i>.</p>
  
  <p>I know the exit code can be received by using <strong>resultproperty</strong> in ant configuration.<br/>
  How can I get the exit code in my .bat file from calling an ant task?</p>