title: Bash or cmd append Java standard out to text file
body: <p>This is not a question about Java source code. This is a question about appending the result of running a Java program from command line with bash or cmd and <em>appending</em> its standard output to a text file.</p>
  
  <p>It is possible to redirect the standard output to a text file. This is destructive and overwrites any previous file with the same name.</p>
  
  <pre class="lang-none prettyprint-override"><code>java HelloWorld &gt; hello.txt
  </code></pre>
  
  <p><strong>Is it possible to append the final result so that the contents of <code>hello.txt</code> are not overwritten every time the program is run?</strong></p>
  
  <p>I looked in <code>man java</code> and did not see anything there about appending.</p>