Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Returning system commands

  Asked By: Ernesta    Date: Oct 04    Category: Java    Views: 617
  


I am using windows xp and I am trying to return system commands such
as clearing the console screen in java. I tried the following:

Runtime.getRuntime().exec("cmd /c cls");

but, it does not clear the console screen. Instead, it just wraps
around to the next line. Am I missing something?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Laura Rodriguez     Answered On: Oct 04

I suspect this will open a new console  shell and tries the command there..
not in the context of opened one. using cls alone wont worksout..

 
Didn't find what you were looking for? Find more on Returning system commands Or get search suggestion and latest updates.




Tagged: