java clear console

Java
Runtime.getRuntime().exec("cls");
Source

Also in Java: