The clue to the problem is in the error message - try putting your code inside 
a try/catch clause.

e.g
       try {
          Runtime.getRuntime().exec("cls");  
           ...
      } catch (IOException e) {  
            e.printStackTrace();  
       }  
--
Evans
http://www.javawug.org
  ----- Original Message ----- 
  From: Nelson Rodrigo - LHQ 
  To: 'Vasile Braileanu' ; 'Java EE (J2EE) Programming with Passion!' 
  Sent: Friday, February 06, 2009 10:17 AM
  Subject: [java ee programming] Re: Clear Console Screen


  Hi when I use that

  Its getting error

   



   

  Nelson Rodrigo
  Staff Officer - Software Development
  LOADSTAR (PRIVATE) LIMITED
  Sri Lanka | Tel: +94 11 483 7914 | Fax: +94 11 224 0892 | Mobile: +94 77 311 
6556

  P SAVE PAPER  - Please consider our environment before printing ΓΌ


------------------------------------------------------------------------------

  From: Vasile Braileanu [mailto:vasilebraile...@gmail.com] 
  Sent: Friday, February 06, 2009 3:39 PM
  To: nelson.rodr...@loadstarlk.com
  Subject: Re: [java ee programming] Clear Console Screen

   

  Hi,
  find the os name (with SystemProperties)

  if is windows you can use 
  Runtime.getRuntime().exec("cls");

  on linux you can use
  Runtime.getRuntime().exec("clear");

  But I think if you want to clear the console maybe is the case you need a 
desktop application (can be very simple, one JDialog and one JPanel with 
JTextArea inside).

  Best regards, 
  Vasile Braileanu


  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

<<inline: image001.jpg>>

Reply via email to