Clear Screen in command interpreter

Hello, can anyone please tell me how I can clear the command prompt from all outputs?
for instance, if "Hello" was printed on screen and I would like to input another string afterwards, can I clear Hello and then input as if no output appeared prior to the input statement?
Thanks,
Batzi
Edited by: Batzi on 23/12/2009 01:36 ?

its giving error
java.io.IOException: Cannot run program "cls": CreateProcess error=2, The system cannot find the file specified
     at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
     at java.lang.Runtime.exec(Runtime.java:593)
     at java.lang.Runtime.exec(Runtime.java:431)
     at java.lang.Runtime.exec(Runtime.java:328)
     at com.ClearCmdPrmt.clear(ClearCmdPrmt.java:12)
     at com.ClearCmdPrmt.main(ClearCmdPrmt.java:29)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
     at java.lang.ProcessImpl.create(Native Method)
     at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
     at java.lang.ProcessImpl.start(ProcessImpl.java:30)
     at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)

Similar Messages

  • Clear screen in command promt

    Is there any way I could clear the screen of in a command prompt with out using native methods.

    In case you're wondering (and I bet you aren't): yeah, I meant dog.

  • "clear screen" command exits sqlplus

    Hi,
    I am running a 10gR2 database. when I issue "clear screen" command at the sqlplus prompt, it throws me out of the sqlplus. there are no error messages.
    anybody having the resolution ?
    thanks.

    I got it ... its a bug in 10.2.0.1, the version which I m using
    bug 4595395      CLEAR SCREEN causes SQLPLUS command line to dump
    this is resolved in 10.2.0.2 patchset. Note: 358749.1
    thanks.

  • Clear screen in "Run SQL Command Line" causes the utility to dump in Window

    Just for your notice... I have not checked if i can reproduce this on Linux platform or on second node running Windows XP Pro.
    But if I use "Run SQL Command Line" utility and do
    clear screen
    The utility dumps, (not the database though only the utlility)
    Maybe some other people could confirm if this findings is a bug or not and if it is a port specific issue with Windows XP only.
    Kindly Rgds
    /Ulf, Kentor IT Sweden

    Tracking info is in
    Re: SQL*Plus generated Program Error
    -- cj

  • Clear Screen, Sql plus Error, in release 10.2.0.1.0

    Hi there,
    I'm having problem in using clear screen command in SQLPlus utility of Oracle Release 10.2.0.1.0. When executing clear screen in SQL Plus ( in command prompt) in windows machine, suddenly a dialogue box opens and saying that "SQLPlus encountered an error and sorry for inconvenience "
    Is this the problem with OS or Oracle Client?
    Could anyone please help me in resolving this issue?
    Thanks
    Raja

    So that is the problem with Oracle client only, not with the OS configuration and all.... shall i assume?

  • Urxvt patch: VTE like clear screen behavior

    I've switched to urxvt last week. I come from the VTE world (gnome-terminal, xfce-terminal and such, the latter in my case). VTE has a nice feature to which I've accustomed myself. This is the way how it handles the clear screen function (ctrl-L).
    In VTE when you press ctrl-L, the screen cursor position gets to top row and the lines get scrolled just before the visible portion of the window. This means that the scrollback remains intact so you can scroll back and see it later. If you press ctrl-L again when you are at top you get a bunch of empty lines - you can use this to mark the scrollback with empty portions when you are scrolling back large amounts of texts.  This is handy for example when you want to quickly glance at an output from a command but you want to differentiate from different outputs - I press ctr-L several times before I execute the command and then I can just quickly scroll back - I immediately spot where the command began because it has a large black spot before it.
    The way urxvt works in this case that it just positions the cursor to the top row and then just erases everything below that point. This means you lose valuable lines from the scrollback. Example: type "seq 1000", press ctr-L. Now you won't see the last lines of the command's output!
    Now it is possible that I have a misconfigured urxvt and I'd be interested in the config option which I have misconfigured.
    Here's a patch for urxvt which adds proper clear screen function and also adds the VTE-like functionality:
    *** src/command.C 2011-10-29 18:06:07.000000000 +0200
    --- src/command.C.patched 2011-10-29 18:05:28.000000000 +0200
    *************** rxvt_term::process_csi_seq ()
    *** 2932,2937 ****
    --- 2932,2948 ----
    case CSI_CUP: /* 8.3.21: (1,1) CURSOR POSITION */
    case CSI_HVP: /* 8.3.64: (1,1) CHARACTER AND LINE POSITION */
    + if (nargs == 1 && current_screen == 0)
    + {
    + // This is usually followed with clear screen so add some extra
    + // lines to avoid deleting the lines already on screen. If we are
    + // already at the top, add an extra screen height of lines.
    + int extra_lines = nrow-1;
    + if (screen.cur.row == 0)
    + extra_lines += nrow;
    + for (int i = 0; i < extra_lines; ++i)
    + scr_add_lines (L"\r\n", 2);
    + }
    scr_gotorc (arg[0] - 1, nargs < 2 ? 0 : (arg[1] - 1), 0);
    break;
    Last edited by rlblaster (2011-10-29 19:07:32)

    Now I see what's happening! Your prompt uses '\e[H' which is used as move to home. I assumed that '\e[H' is usually followed with clear screen. This means if you use it to just move the cursor to home it won't work. I don't really see how could I fix this nicely but here's a workaround for your prompt: use '\e[1;1H'. In other words:
    PS1=$'%{\e[s\e[1;1H\e[30;42;1m%}[%~][%M] %{\e[K\e[256C\e[8D\e[30;42;1m%} [%D{%H:%M}]%(?,%{\e[32;32m%}\u2588,%{\e[31;41;1m\u2588)%}%{\e[u\e[1A%}\n%{\e[0;32m%}> %{\e[0m%}'
    By the way the feature of adding extra blank lines if your cursor is already at top won't work in your prompt because your cursor is always at least on row 1. You could change the patch from
    if (screen.cur.row == 0)
    to
    if (screen.cur.row <= 1)
    to have this feature.

  • What is function to clear screen ??

    hi,
    What i s function to clear screen .. for example in C-languse we use clrscr();
    like that what is function in java to clear screen.. that is in command prompt window clear

    I dont thik u can do this...
    since u are writing to a stream. so what ever is written is written...
    but if u have any ur own component developed u can do this.
    regards,
    Karthik

  • Clear screen from sql file

    at sqlplus prompt, I can type either HOST CLS or CLEAR SCREEN and both work..
    but when I put either of them in an .sql file and run it from sql with @c:\file.sql
    both commands error with:
    ORA-06550
    PLS-00103 encountered 'CLS' or 'SCREEN'
    OS IS Windows 7 with Oracle 11.1.0.6 client
    my goal is to run a dbms_output line while in a loop
    so the data shows on the screen and refreshes when it is changed
    without clearing the screen, it just shows over and over and scrolls by a list of them very fast

    Merlin128 wrote:
    at sqlplus prompt, I can type either HOST CLS or CLEAR SCREEN and both work..
    but when I put either of them in an .sql file and run it from sql with @c:\file.sql
    both commands error with:
    ORA-06550
    PLS-00103 encountered 'CLS' or 'SCREEN'
    OS IS Windows 7 with Oracle 11.1.0.6 clientThe SQL*Plus CLEAR SCREEN command works for me.
    my goal is to run a dbms_output line while in a loop
    so the data shows on the screen and refreshes when it is changed
    without clearing the screen, it just shows over and over and scrolls by a list of them very fastSorry, I don't think you can do that.
    Dbms_output does not display anything while the PL/SQL code is running. In fact, it doesn't actually display anything, ever. Dbms_output merely puts text to be displayed into a buffer. When control returns to SQL*Plus, then SQL*Plus displays all of the buffered text together. So if your PL/SQL block consists of a loop that takes 10 seconds per iteration, and you go through the loop 6 times, you will wait a full 60 seconds before seeing any output, and then see all 6 lines as quickly as PL/SQL can display them.

  • After having downloaded the free version of Maverick OS X, HD version, I haven`t got a clear screen anymore and even on my photos lots of scratches in different colours appear. It seems to me that something went wrong.

    Since I have downloaded the free version Maverick OS X, HD version, from the App Store, I haven`t got anymore a clear screen whenever I open a page. Scratches and stripes appear and this is especially annoying when I wanna have a look on my downloaded photos from my iPhone 5 S. Does anybody know a solution ? Maybe somebody is struggling with the same problem.

    I'm not sure what you mean by HD Version. There is only one Mavericks and I find nothing about HD.
    Perhaps you have the display resolution set wrong for your display.

  • Out of memory, clear screen, cannot boot, no icons

    I have lost all icons. Cannot boot without a hard boot. Clear screen.
    All day long it said out of memory. I have 10gb. I cannot even access utilities or any programs.
    Really lost.

    http://www.macmaps.com/diskfull.html
    http://www.thexlab.com/faqs/freeingspace.html
    https://discussions.apple.com/thread/2804827?threadID=2804827
    Boot from another drive then. Don't have one, then boot from OS X DVD : Restore : and copy (clone) 'source' your drive to a new 'target' drive
    http://macperformanceguide.com/Mac-HowToClone.html
    http://macperformanceguide.com/Mac-HowToClone-backup.html

  • How to invoke the command interpreter to run the "NS.exe" using Runtime?

    hi,everyone
    I need to invoke the command interpreter,and enter the disk directory "c:/ns2/bin/",then run the "ns myfilename" command.My program is followed:
    try{
    String s[]=new String[4];
    s[0]="cmd.exe";
    s[1]="/c";
    s[2]="cd c:/ns2/bin";
    s[3]="ns.exe c:/ns2/bin/100n-500k-5.tcl";
    Runtime R=Runtime.getRuntime();
    Process p=R.exec(s);
    int exitVal = p.waitFor();
    System.out.println("Process exitValue: " + exitVal);
    But this doesn't work!
    please help me! thanks!

    hi,everyone
    I need to invoke the command interpreter,and
    and enter the disk directory "c:/ns2/bin/",then run
    the "ns myfilename" command.My program is followed:
    try{
    String s[]=new String[4];
    s[0]="cmd.exe";
    s[1]="/c";
    s[2]="cd c:/ns2/bin";
    s[3]="ns.exe c:/ns2/bin/100n-500k-5.tcl";
    Runtime R=Runtime.getRuntime();
    Process p=R.exec(s);
    int exitVal = p.waitFor();
    System.out.println("Process exitValue: " +
    alue: " + exitVal);
    But this doesn't work!
    please help me! thanks!CDing will not change the directory.
    should write:
    String cmd= "cmd /c c:\\ns2\\bin\\ns.exe c\\ns2\\bin\\100n-500k-5.tcl"
    for further details on how to use Runtime.exec(), see http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Design of a simple Command Interpreter

    Hi,
    I have a scenario where a client pgm passes a command string to a Command Interpreter. There are several possible commands. The Command Interpreter accepts these command strings and makes API invocations on some other object.
    Some Commands would need to return a value, whereas some others do not need to. These results need to be passed back to the client.
    What should the Command Interpreter interface look like ?
    For isntance, one command could be somethinfg like <getAllCustomers/>.Another command could be like <deleteCustomer name="foo"/>. The former would return a Document of all Customers. The second one does not return a value,but could throw an Exception.
    I was thinking of a CommandInterface with a single method named processCommands(String commandXML(. But this would not work if I need to have different types od return values. Moreover, these APIs are more or less unrelated to each other. i.e. different from a Strategy pattern where there is a specific heirarchy/relationship.
    Any ideas are welcome.
    rgds.
    Menon.

    1) What should the Command Interpreter interface look like ?I would use the Command Pattern.
    http://www.javaworld.com/javaworld/javatips/jw-javatip68-p2.html
    You can combine this with the memento pattern.
    Here is the interface that i use when implementing the command pattern.
    * An Interface for a Command Object
    * see Command Pattern [GOF:233]
    * @author martin.spamer
    * @version 0.1 - 14:08:58
    public interface CommandInterface
       *  An Interface for a Command Object
       *  see Command Pattern [GOF:233]
       *  @param java.util.Properties
       *  @return java.util.Properties
      public java.util.Properties execute( java.util.Properties properties)
        throws CommandException ;
    2) What is the best way to dispatch the XML requests to different API
    invocations on a particulat object. For instance,I use a CommandFactory which I drive with an xml config file.
    and drive it something like:
    <actions command="CommandString" classname="uk.co...ClassName"/>

  • Printer message on computer says deleting print but will not clear screen and will nopt print

    my printer message says deleting for current print. but it will not clear screen and i cant print anything

    Hi @davecdavec6601,
    Welcome to the HP Forums!
    I understand that you cannot print, and I am happy to help!
    For further assistance, I will need to know some additional information:
    The Product/Model Number of your printer. Follow instructions in this link. Finding Your HP Product Model Number.
    If you are using a Windows or Mac Operating System, and the version number. To find the exact version, visit this link. Whatsmyos.
    If the printer is connected, Wireless, Ethernet, or USB.
    If the printer is able to make copies.
    If the power cable is plugged into a surge protector, or directly to the wall outlet. Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector. This applies to Inkjet printers as well. 
    Please see this post, Want Good Answers? Ask Good Questions, by @Bob_Headrick, so you can get the most out of these forums.  
    Hope to hear from you soon, and thank you for posting!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Clear screen protector application - air bubble removal

    I have bought many clear screen protectors and often have had issues trying to get the air bubbles out from the screen protectors. Sometimes, dust is underneath the protect and when I try to clean it out using the cloth included with the protector, it gets even more dust and then the protector becomes useless. Is there any recommendations on how to best avoid getting air bubbles underneath your screen protector?

    I just received and installed the Incipio Feather case on my iPhone 4. I had it on my 3G and liked it as it is a very slim, unobtrusive case and is like a hard plastic core with a matte, slightly rubbery, velvety surface. I had installed Zagg first, but was displeased with the orange peel surface on the front. I left the Zagg on the back as I do feel it will offer good protection from the back and removed it from the front. The case fit with no problems. The incipio feather comes with 2 hard clear screen protectors with a hole for the front camera, and the front protectors are MUCH better than having the rubbery, lumpy Zagg on the front screen and don't require any liquid to apply. I was hoping I would get one crystal screen protector and one matte protector as I did when I used Power Support screens in the past, but they are both clear. The surface is smooth and nice. I don't have any loss of signal now when I hold the phone in my palm cupping the lower left side. I probably slightly prefer the matte power support screen as it is easier to keep clean, but power support is not shipping yet. If I had to do it over again I would skip the Zagg and just get the incipio. Just my 2 cents and thought I'd share my experience.
    http://www.myincipio.com/product/IPHONE4IPH-512/Matte-Black-Ultra-Light-featherÂ-Slim-Form-Fitted-Case-for-iPhone-4.html

  • Clear screen in Dos AND Linux????

    Is there a way to clear screen (similar to C++ clrscr()) in Java? I badly need some help on this.
    Cheers
    Kaps.

    kapilaj: clrscr() and constrea.h do not seem part of ansi C++, and I've only seen them as a part of dos/windows libraries. The close counterpart to the iostream library in Java would be the java.io package, but in looking through the documentation for it, I was surprised to find no obvious method to do a screen clear. Though, given the platform specific nature of terminal output, this would perhaps be hard (or impossible?) to implement. One kluge that would work on windows and most unices would be to simply print 25 nextline characters.

Maybe you are looking for