Posted By:
neal_ravindran
Posted On:
Monday, April 1, 2002 07:07 AM
public class ClearScreen{
public static void main(String args[]){
for( int i = 0; i < 1000; i++ ){//1000? just my idea...you could use say, 50
System.out.println();
}
}
}
Poor man's soln...but you should try JNI with the C function clrscr().
The following however did not work for me...and have no clue why(it should when used inside main!)
try{
Runtime r = Runtime.getRuntime ();
Process p = r.exec ("cmd /c cls");
}
catch(IOException e){
}