title: How to Clear Console in Java?
body: <p>I have been pulling my hair for this since quite long time. I have researched for an hour on how to clear a console in Java.</p>
  
  <p>All I found was dirty hacking either by printing a bunch of lines or executing this </p>
  
  <pre><code>Runtime.getruntime.exec("cls/clear");
  </code></pre>
  
  <p>However, nothing seems to be working for me. Isn't there really any a way of clearing the console in Java like in C (<code>clrscr();</code>). Isn't there any external library by which this can be achieved. </p>
  
  <p>Please let me know if anyone has ever done this before using a proper function, library etc. instead of dirty hacking.</p>