title: ant java task : redirecting output with spawn=true
body: <p>Greetings,</p>
  
  <p>a rather clear question here.</p>
  
  <p>I have to launch a java job with <code>&lt;java&gt;</code>, which is to be run in parallel with ant and it's okay if the job outlives the ant process, hence <code>spawn="true"</code>.</p>
  
  <p>I have to see the job output in a designated file. This is perfectly achievable via <code>output="job.out"</code> for <code>spawn="false"</code>, but I am kinda out of luck having <code>spawn"=true"</code>.</p>
  
  <p>So, is there any modestly dirty hack or I really have to wrap the <code>java</code> call with an <code>exec</code> like the one below?</p>
  
  <pre><code>CMD /C my-java-command-and-hardcoded-classpath-goes-here &gt; job.out
  </code></pre>
  
  <p>Thanks,
  Anton</p>