I am used to clear the screen with C++ with absolutely no problems, but it seems like it's not that simple with Java.
I have tried both Runtime.getRuntime().exec("cls");
and
String[] cls = new String[] {"cmd.exe", "/c", "cls"};
Runtime.getRuntime().exec(cls);
Which are the solutions I have found around the web (mostly here in StackOverflow), but they don't seem to be working on my computer...
The first try reports the following caught IOException
:
java.io.IOException: Cannot run program "cls": CreateProcess error=2, System cannot find the file specified