I am aware of the clear
command in a Terminal that will clear off the screen and return you to just (in my case): harrisbookpro: ~harris$
and I just wanted to see if it was possible to do the same in my program (which runs through the terminal).
views:
20answers:
2
+1
A:
if you are using a terminal that undersands ansi-esc codes (like for example any linux terminal that uses the xterm protocol) you can use
System.out.println("\033[2J\n");
to clear the screen
Nikolaus Gradwohl
2010-06-22 14:02:49
thanks a lot! it turned out to only work when i compile the .java files.
harris
2010-06-26 16:18:28