title: Ant Java task : how to get output to console and a file-always record build output without shell redirection
body: <p>I am using ant to start a Java program. </p>
  
  <p>I do not want to "loose" the output, after the program terminates.  So I use the property '<code>output</code>' to store the output in a file.</p>
  
  <pre><code>&lt;java classname="..." fork="true" output="....txt"&gt;
  </code></pre>
  
  <p>Unfortunately I do not have any console output anymore. What would be a nice way to have the output on the console <strong>and</strong> in a txt file.</p>
  
  <p>I am looking for an alternative to</p>
  
  <pre><code>ant mytast &gt; myFile.txt
  </code></pre>
  
  <p>because I do not want, that the "user" has to use shell redirection "> ..".  . If he/she does not choose to redirect,  the output is lost.  </p>