title: Calling ant file through java code
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6440295/is-it-possible-to-call-ant-or-nsis-scripts-from-java-code">Is it possible to call Ant or NSIS scripts from Java code?</a>  </p>
  </blockquote>
  
  
  
  <p>I need to call an ant build in java code. I try to use Runtime class. I dont know how to give the ant build  to the following code. I tried to assign the entire ant script to a string, it wont work. Any suggestion </p>
  
  <pre><code>Process child = Runtime.getRuntime().exec("command");
  </code></pre>