title: How to output java -jar errors to a text/log file?
body: <p>i have googled my heart out! I am trying to figure out how to output any errors a java class might give when executing java from the Windows command line. </p>
  
  <p>For instance</p>
  
  <pre><code>java -jar class.jar &lt;someFile.file&gt;
  </code></pre>
  
  <p>if that line throws any errors, i want them to be stored into a text file for later reviewing. </p>
  
  <p>I tried</p>
  
  <pre><code>java -jar class.jar &lt;someFile.file&gt; &gt;&gt; log.txt
  </code></pre>
  
  <p>But despite throwing errors the log.txt file is empty.</p>
  
  <p>Thanks all!</p>