How do I clear the screen in console application?

In C or C++ we can clear the screen by clrscr() function.
How can I acheive something similiar to this in Java

Hi,
Take a look at the below link may help you
http://www.codeguru.com/forum/archive/index.php/t-323058.html
This forum is exclusively related to discussions about Sun java Studio Creator. Henceforth please post these threads to an appropriate forum.
MJ

Similar Messages

  • How do I clear the screen in text mode (cls)

    How do I clear the screen in text mode (cls)
    Thanks,

    Clearing of console is an OS specific command, so
    in case of Windows you should try:
    Runtime.getRuntime().exec("cls");Though it wouldn't help, because exec() will be done as a separate
    process... :)
    Paul

  • How do I clear the Screen Saver?

    How do I clear the Screen Saver from showing the photos on my phone?

    You must have set it to use your photo stream as the screensaver. You can go into settings - screensaver to change to a different source.

  • How do I clear the screen?

    Hello,
    I would like to know how to clear the screen. What is the code for it?
    Ernest_E

    Hi,
    Look to the left. There is a search field there. This question is often asked. The short answer is that you can't do it.
    /Kaj

  • How i can clear the screen in JAVA?, in c++ is  command that called .......

    system("cls")
    but in JAVA??
    thx
    gicio1

    system("cls") is the silly way to do it. For a start, "cls" isn't on most computers, because most computers call it "clear". You could run this from Java using Runtime.exec("clear"), Runtime.exec("cls"), etc .. but the best way to clear the screen is still to print out N newlines, where N is the height of the screen.
    The only problem with this way is, you don't know the height of the screen. You could pass an environment variable in as a system property, from whatever launches your program, and if it's not there "assume" it's 200 or something. Then just build up a string with "\n\n\n\n\n\n\n\n"... and print it out. Blam, blank screen. :-)

  • How can i clear the screen???

    yup! how can i d that before i print the content into the screen???

    In Windows, you can use this configuration. Don't forget the changes in config.sys.
    // The following line must be added to
    // config.sys for clearscreen to work !!
    // DEVICE=C:\WINDOWS\COMMAND\ANSI.SYS
    public class ClearScreen {
      public Test() {
        System.out.println("Hi How are you?\n\n\n" );
        System.out.println("Hi How are you?\n" );
        char esc = 27;
        String clear = esc + "[2J";
        System.out.print(clear);
      public static void main(String[] args) {
        new Test();
    }

  • How to clear the screen in the command prompt?

    Hello Everyone,
    I was wondering how we can clear the screen in the command prompt in Java. I remember we can do this in C by writing system("cls");
    What is the best IDE for writing Java programs. Is the NetBeans IDE good? Thank you very much.

    I was wondering how we can clear the screen in the
    command prompt in Java. I remember we can do this in
    C by writing system("cls");I guess there's no Java way of doing that because it's a function of the shell you're calling. If you try to use Runtime.exec on cls, it starts yet another shell, clears that, and closes it again, so it has no effect on your output.
    You could try using the '\b' backspace character, if that helps.
    What is the best IDE for writing Java programs. Is
    the NetBeans IDE good? Thank you very much.By the way you're asking this question, the answer will be almost certainly "none". If you want to, you can search this board for the few million times this question was asked before, pick all IDEs suggested there and use the one you're most comfortable with.

  • Clearing the screen

    I realize this has probably been covered before but how do you clear the screen of previous lines of code?
    I am using Crimson Editor and the latest SDK and running programs in a DOS shell.
    Please let me know how to do it, if it is a DOS command how to implement into my program and if a java method what the parameters are.
    Thanks.

    If you are wanting to clear the DOS window, there is no provision in Java for that. You could output new lines from your program and force the data on the screed to scroll off.
    The DOS command to clear the screen is "cls" and you will need to use runtime method. Search the forums for that method, there are literally hundreds of posts on the subject. The search is in the upper right corner.

  • How do i clear the  console

    Hi Experts
    I need to know "how do i clear the console " and
    "how do position the mouse cursor in x and y coorditates in a console "
    Thanks in advance

    You don't. Or, it depends on the console. Depending on your point of view.
    Java doesn't directly control it the same way that it controls an AWT window for example. It just sends bytes to it. If the console is capable of interpreting bytes in such a way to clear the screen, then it can.
    Most consoles a person is likely to use will interpret VT100 commands. Look them up; try google. You can just output those commands and the console will do what they say, hopefully.
    Sending a control-L (bye 0x0c, I think) may do it. Try that.
    Or you can try the java curses library.
    All this may be wrong if you mean something by "console" other than what I think you mean.

  • How to clear the screen in java?

    Hi,
    How to clear the screen in java without using any loops?
    Thanks

    Just paint with your background color to let the old paintings vanish.

  • When I am on my home screen on the iPhone, swipe left to the search page. Put a letter in the search field. then scroll down. eventually you get to all your texts previously deleted or not. The are all there. How can I clear the entire text from the phone

    When I am on my home screen on the iPhone, swipe left to the search page. Put a letter in the search field. then scroll down. eventually you get to all your texts previously deleted or not. The are all there. How can I clear the entire text from the phone

    When I am on my home screen on the iPhone, swipe left to the search page. Put a letter in the search field. then scroll down. eventually you get to all your texts previously deleted or not. The are all there. How can I clear the entire text from the phone

  • Hi, I am trying to download IOS7 to my ipad. The programme has locked at the 'Choose a Wif-Fi network' page, a box says 'joining other network' but the page is greyed out and can't move from it.  How can I clear this screen and finish the download. Thanks

    Hi, I am trying to download IOS7 (not sure if it's 1 or 2) to my ipad. The programme has locked at the 'Choose a Wif-Fi network' page, a box says 'joining other network' but the page is greyed out and can't move from it.  How can I clear this screen and finish the download. Thanks

    Hello Den53,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430?viewlocale=en_US
    Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider.
    After the device has turned off, press and hold the Sleep/Wake button until the Apple logo appears.
    Best of luck,
    Mario

  • How Do I Clear the app download screen

    How do I clear the app update screen after I have updated the apps.

    TThe apps do not delete.  Apple has not programmed this I to the system.  Keep on letting them know that this clutter is not necessary.  Everyone was used to the old system, update and disappear when done.  I do not like the clutter myself.  Keep on asking apple to fix this.  

  • Does anybody know how to Clear the screen in Java?

    Hi guys,In C we use System Clear.
    In java,which instructions shall i use in order to clear the screen?
    Thanks,in advance!

    Of course you shouldn't do so anyway...
    Terminal programs should coexist with all other terminal programs and not try to dominate the screen.
    They should never clear the screen as this would remove output from other programs running in the same terminal.

  • Clearing the screen in a console program....?

    why is it that you can type 'cls' in dos and instantly clear the screen and yet there is no (or at least none that I've come across) equivalent command in java?
    anybody...?
    Thanks.

    http://search.java.sun.com/Search/java?col=javafrm&qp=&qt=clear+screen

Maybe you are looking for

  • How to open pdf from an url into an acrobat control for vb

    I have a vb requirement like this: We have pdf files generated on a server and put in path like http://servername:port/pdfReports/report.pdf Desktop applications need to show these files.. we have an acrobat reader control on one of the forms and try

  • Invoking Session EJB (with WSIF binding) from a BPEL process

    Hi, I am invoking a stateless session bean from a bpel process. The bpel process is throwing: Failed to lookup EJB home using JNDI name 'ejb/visilient/BPELHelper'; nested exception is:      java.lang.NullPointerException I can see the ejb jndi name u

  • I lost my bookmarks while trying to sync with another device. Can I get them back?

    I have tried to sync with a new device. I Had a lot of trouble finding the code which I used last time I synced devices. It seems that I didn't need to do that anymore after signing out and in, it suddenly seemed to work. All the bookmarks that wasn'

  • Exporting multiple tracks for podcast?

    I recorded the voices for a podcast on the first track, and put some jingles/bumper music music on the second track. When I tried to Share>Export song to disk, it only exported one track or the other. How do I export multiple tracks? Thanks.

  • Help with Strategy Pathern!

    Hello, I need to parse a very complex text file. If I keep all the parsing code in one file, it will be huge. Then I thought probably I can use strategy patthern to decouple it. "Another technique has a context pass itself as an argument, and the str