Clearing the console window

hi,
I'm currently writing a relatively simple CLI based java program, such that I'm just (for output) using System.out.* type functions...
anyway, it'd make my application look a fair bit better if I could clear the console where I output the text...
is this possible (under unix or windoze)? if so, any hints?
regards,
Jack

I haven't tried this myself, but you might try looking at a program called jcurzez.

Similar Messages

  • 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.

  • Clearing the console screen

    I am tring to clear the console screen using java like clrscr() function in c..( cls command in Dos).
    Can anyone help me out.

    Hi ,
    Try this code.
    char esc = 27;
    String clear = esc + "[2J";
    System.out.print(clear);
    And this line must be inside the config.sys:
    device=c:\windows\command\ansi.sys
    Hope this helps.
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • Input a string and assign to a variable in the console window

    i'm absolutely and completely new to java
    i need to be able to input a string and then assign it to a variable, entirely using the console window, basically i'm looking for the Java alternative to C++'s "cin"
    i've tried the System.in. method but nothing seems to work
    i know this should be simple, but i cant find it anywhere
    cheers

    i've tried the System.in. method That thing is not a method: it's an object, an intstantiation of the InputStream
    class. If you read the API documentation for that class you'll notice that it
    isn't much more sophisticated than C's file IO. You can wrap an
    object if this class in a more high level class (see InputStreamReader
    and BufferedReader).
    The latter allows you to read an entire line of characters. If you really want
    to go fancy you can wrap the first class in a Scanner which is only
    available in Java 1.5
    kind regards,
    Jos

  • How can I disable the console window shown by JWS on the client machine

    Hi,
         When I open the JWS Application Manager, and go to File ->Preferences -> Advanced tab and select Show Java Console, it opens up a small window displaying all the error messages. I want that when a client downloads my JNLP application and selects this option he is not able to see the console window. How can I achieve this?
    Thanks,

    You can check on the <b>about:config</b> page if the browser.urlbar.autocomplete.enabled pref is set to false if you want to disable the location bar drop down list.
    *http://kb.mozillazine.org/about:config

  • How can get the console window name of the current form?

    How can get the console window name of the current form?

    Try the various get methods of the viewObject such as getQuery:
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtAnchor.getQuery%28%29/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7CViewObject%7Ehtml/

  • Directing std output to the console window

    I am trying to direct the standard output from a separately executed console program to the console window belonging to the running application. How can I do this?
    For example, in the following code, if I execute the simple Windows 'dir' command using .exec, how can I make the output go to the application's console instead of going to a separate window?
    import java.io.*;
    class dir
      public static void main(String[] args)
        try
          Process runprogram = Runtime.getRuntime().exec("cmd.exe /C start dir");             
        catch(IOException e){}
    }

    First I will post the mandatory link for everybody who asks about Runtime.exec():
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Read that and notice the bit about getting data from the process's output stream. You can copy that data to the console.

  • Clearing the DOS Window in Java

    hi
    I want to clear the dos screen using java.
    I saw 2 solutions on the net(given below) , but both did not work. Can someone advise how I can go about doing this ? I'm
    working on Windows2000.
    Thanks in advance.
    Seema
    1. char esc = 27; // ESC code
    String clear = esc + "[2J" // note case
    System.out.print(clear); // Dos screen should be cleared
    2. Runtime.getRuntime().exec( "cmd.exe /c cls" ) ;

    The escape code approach would only work on DOS windows that are processing ANSI escape sequences. This is something people used to enable all the time back in the pre-Windows days, since it was the only way to do things like clearing screens, setting colours, drawing menus out of text characters, etc. Ansi.sys still exists, at least on Win98 (not sure about NT, 2000, etc.). If you troll through the Microsoft web site or hunt down old books on DOS, you'll be able to find out how to set it up and use it.

  • How to Clear the Console in java

    Hello
    i am new to java. in one of my assignment i have to clear the screen
    i have tried the following approaches which are not working , one more thing i am using win xp[ with service pack 2
    i have tried following
    1 passing th eansii escape sequence to output
    2 tried to use the Runtime class
    3 tried the Console class
    4 i want to avoid this system.out.println(" "); in a loop
    now what i have to do can anyone help me
    thanks

    Hello
    i am new to java. in one of my assignment i have to
    clear the screen
    have tried the following approaches which are not
    working , one more thing i am using win xp[ with
    service pack 2
    have tried following
    1 passing th eansii escape sequence to output
    2 tried to use the Runtime class
    3 tried the Console class
    4 i want to avoid this system.out.println(" "); in a loop
    now what i have to do can anyone help me
    thanksIf you want to do this with your standard command shell, the only practical solution would be option 4.
    Or have a look at JCurses, I believe it can do that kind of stuff:
    http://sourceforge.net/projects/javacurses/

  • How do I remove an unwanted server from the console window?

    Hi all, hope someone can help, as I'm rapidly running out of hair to pull out :-(
    I have one upstream server, set up perfectly on Windows Server 2012, and six downstream servers all running Windows Server 2008 R2 Enterprise. Five of my downstreams are set up and working as expected, but one is behaving a little strangely.
    Here is an example of one of my downstream servers which is configured correctly:
    Just showing the upstream server, as you would expect.
    Now here's my problem downstream server:
    As you can see, not only does it list the upstream server, as expected, it also shows itself as a server. I have tried right-clicking it and choosing 'Remove from Console', but it just comes back after closing and reopening the console.
    Any advice would be greatly appreciated,
    Carl...

    On all downstream servers, except ServerDOWN4 only the ServerUP01 is seen in the WSUS console. On ServerDOWN4, you can see ServerUP01 and ServerDOWN04 in the WSUS console.
    Is this normal?
    No, and the short answer here is that apparently the consoles were configured to connect to the wrong server, and on 'DOWN4', TWO servers were configured in the console.
    But here's a more significant question....
    Why, on WS2012 and WS2008R2 servers are you using the standalone console anyway? If you use
    SERVER MANAGER, which is the expected behavior, the *LOCAL* server will be automatically displayed.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • Clear the console via script?

    Is there a way to clear the Extendscript Toolkit console from the script running?
    Thanks!

    found few lines code about ame-scripting, in japanese
    http://qiita.com/tags/extendscript
    clearing console
    [code]
    var bt = new BridgeTalk();
    bt.target = 'estoolkit-4.0';
    bt.body = function(){
        app.clc();
        }.toSource()+"()";
    bt.send(5);
    [/code]
    That's very interesting. Definitely outside the box thinking.
    thx, David Torno for yours getting started videos
    You're welcome.

  • How do I store and save photos in a file so that I can clear the main window

    How do I move and store photos in an album so that I can delete them from the main screen as this is getting very clogged up. Thanks

    You don't "delete them from the main screen". You can increase the size of thumbnails - note the slider on the bottom of the window - and scroll.

  • How to get rid of the console window and keep the GUI?

    i made a jar, but my app needs the API to sniff the network.
    i made a .bat file so that i can run the jar file without having to type in the commands.
    //contents of myApp.bat
    start java -Djava.library.path="jnetpcap-1.3.0" -jar myApp.jarthe problem is, there's this fugly CMD prompt that just wont go away. if i close it, it closes my app as well. so, how do i solve this?
    thanks.

    Use the "javaw" command instead of the "java" command.

  • Closing Console window while running Java application from Batch file

    Hi all,
    I have made a small application using Java swings,now i have made a jar file of my application and calling this jar file through batch file,when user clicks on that batch file it runs "java -jar applicationname.jar" command,but problem is that when i run that file from batch file it opens Dos console window at baclk of the screen which looks weird for a desktop application,i dnt want that Dos console window visible at the backend while my application is running,i have searched regarding this on google but found nothing usefull,if anybody can please help regarding that it will be a great releif for me,i have been stuck on this problem from last two days.
    Thanks.
    Simer

    warnerja wrote:
    georgemc wrote:
    warnerja wrote:
    start java -jar applicationname.jar
    That'll pop up another consoleI'm under the impression that the console window he is seeing is the one which cmd.exe opens when it is executing the batch file. And that batch file won't return until the java process has completed because he didn't start it in the background to let the batch file continue and terminate.
    So I don't think just simply substituting java with javaw will do much good either. Still think he needs a "start" command in that batch file.
    So now he can try:
    start java -jar ...
    or
    start javaw -jar ...Fair point

  • JRE 1.4.2 Plugin - Error in console window

    I have just installed the latest JDK 1.4.2. When I run any of our applets I get the error below in the console window.
    Can't find bundle for base name sun.awt.windows.awtLocalization,
    locale en_GB
    I have tried this on other machines and get the same error.
    It didn't have this problem with the previous installation that we used 1.4.1_04.
    Has anybody got any idea what's causing it and how to fix it ?
    Thanks

    I have the exact same problem, and when i try to use the back space button in a text field in the applet, it either shows as Question marks or as rectangles...
    This is not an issue with MS VM...
    db

Maybe you are looking for

  • When i try to execute a report from forms10g i found the errore id not ....

    i have a button in a form that run on forms10g that tri to execute a report in the web : the trigger is this **** when i try to execute the button the error is that the is impossibile to find the "report ID"??? there is a easist solution to execute a

  • Oracle Reports Listing/Summary

    Does anyone have a document that lists all Oracle Reports (or even just PO reports) and includes a brief summary of what each does? Thanks in advance.

  • Dynamically add an in memory Bitmap to a List

    I'm trying to dynamically add an in memory Bitmap to a List control. I'm trying to create a thumbnail from a larger bmp image and display the thumbnail in the list. The thumbnail images are being created ok but the bitmaps are not displaying in the L

  • Sine wave frequency problem

    hello i have some part of my program that is not working well. the idea is to sample a 2V sine wave of various frequency and record down the max and min values by right i should get around +2 and -2 for my max and min values however at frequencies mu

  • I have a subscription to Acrobat standard, How to reload ?

    Hello, I currently have a subscription to Acrobat Standard which I need to reload on my system.  I cannot find any instructions on how to do this, nor can I find a download location not linked to purchase. Help. Thanks Sean