File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes clearing the screen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "clearing the screen" Watch "clearing the screen" New topic
Author

clearing the screen

volsteni raj
Greenhorn

Joined: Jan 27, 2005
Posts: 3
Can anyone provide code for clearing the screen in java code
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Hi,

Welcome to JavaRanch!

There's no "clear the screen" API method in Java. You have two choices: you can print enough blank lines to push everything off the screen, or you can directly print a clear-screen control character (if your platform supports one.) Most UNIX terminals, and some versions of Windows if ANSI.SYS is installed, support ANSI control characters. See, for example, this.


[Jess in Action][AskingGoodQuestions]
Preetham Chandrasekhar
Ranch Hand

Joined: Nov 05, 2003
Posts: 98
printing blank lines is the option i know bout


"In theory, there is no difference between theory and practice. But, in practice, there is."<br /> - Jan L.A. van de Snepscheut
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: clearing the screen