aspose file tools*
The moose likes Beginning Java and the fly likes Erasing the console!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Erasing the console!!" Watch "Erasing the console!!" New topic
Author

Erasing the console!!

Sidd Kulk
Ranch Hand

Joined: Feb 20, 2007
Posts: 152
We all know that using System.out.println(); we can output our values to console. Is there any way we can erase values from console?? Say, I output a string through SOP, and after that I wish to erase it from console. Is it possible??

Thanks
Sid
[ April 27, 2007: Message edited by: Sidd Cool ]
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

I think there is not possibilities to doing this...


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Srikanth Ramu
Ranch Hand

Joined: Feb 20, 2007
Posts: 76
If you want to redirect all the System.out.println() to any file then you can use System.setOut(PrintStream out);

This way you can avoid printing in the console and refer the file the prints
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8873
    
    8

You can use ASCII control characters, like 0x0d (carrage return) or 0x08 (backspace) to control the cursor on a single line. If your console recognizes ANSI escape sequences, they allow greater flexability (Windows requires some configuration to get these to work).
If you want a fully-featured GUI, use AWT or Swing.
By the way, Sidd, we have a naming policy here at the Ranch. In short, your name must be a first and last name, separated by a space and not obviously fake. You can change your name here. Thanks for your prompt attention.
[ April 27, 2007: Message edited by: Joe Ess ]

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
jQuery in Action, 2nd edition
 
subject: Erasing the console!!