View Single Post
Old Feb 28th, 2009, 1:23 PM   #2
Sorrofix
Expert Bug Developer
 
Sorrofix's Avatar
 
Join Date: Apr 2008
Location: Canada
Posts: 56
Rep Power: 10 Sorrofix is on a distinguished road
Re: How to ClearScreen the Cmd

Java doesn't have a standard function for clearing the screen (much like C), so you have several options: clear it with a lot of newlines, call a system program to clear it (such as "clear" or "cls"), or use a special library such as ncurses.

Keep in mind that many users find clearing the screen rude, though, since it's really not your business to clean up their console. How do you know that they don't have important reference data on screen only to be wiped by some programmer who thought it would look "cleaner" that way?

Last edited by Sorrofix; Feb 28th, 2009 at 1:30 PM. Reason: Oh, I'm sorry, I thought this was C :o
Sorrofix is offline   Reply With Quote