title: How to clear console in java (Using netbeans)
body: <p>I am using jdj 1.7,netbeans 7 versions. I wrote a program that's working fine. Now i want to clear the console window after many outputs in the console. I tried the below line <code>Runtime.getRuntime().exec("cls");</code> also tried with exec("clear"). But i am getting these errors: <code></p>
  
  <pre><code>Exception in thread "main" java.io.IOException: Cannot run program "cls": CreateProcess error=2, The system cannot find the file specified
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
  at java.lang.Runtime.exec(Runtime.java:593)
  at java.lang.Runtime.exec(Runtime.java:431)
  at java.lang.Runtime.exec(Runtime.java:328)
  at Periodical.main(Book.java:88)
  </code></pre>
  
  <p>Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
      at java.lang.ProcessImpl.create(Native Method)
      at java.lang.ProcessImpl.(ProcessImpl.java:81)
      at java.lang.ProcessImpl.start(ProcessImpl.java:30)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) </code></p>
  
  <p>What's the problem here. How can i clear the console? Thank you</p>