2 Replies - 14329 Views - Last Post: 22 January 2007 - 03:05 PM Rate Topic: -----

#1 kwikness   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 22-January 07

Clear command prompt screen (WinXP)

Posted 22 January 2007 - 01:03 PM

Hi, in C++, there is a command you can use to clear the command prompt screen. The command is used like so:

system("cls");

Is there such a command in java? If so, what is it?
Is This A Good Question/Topic? 1

Replies To: Clear command prompt screen (WinXP)

#2 William_Wilson   User is offline

  • lost in compilation
  • member icon

Reputation: 207
  • View blog
  • Posts: 4,812
  • Joined: 23-December 05

Re: Clear command prompt screen (WinXP)

Posted 22 January 2007 - 01:14 PM

the short answer is, you can't. There are ways of doing it that are platform dependant, but depending on whether it uses command.com or other there is no guarentee it will work. The only thing i can suggest is a loop of println(), as lame as that is.
Was This Post Helpful? 0
  • +
  • -

#3 kwikness   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 22-January 07

Re: Clear command prompt screen (WinXP)

Posted 22 January 2007 - 03:05 PM

View PostWilliam_Wilson, on 22 Jan, 2007 - 01:14 PM, said:

..There are ways of doing it that are platform dependant


Yeah I just wanted to do it in WinXP. Not interested in writing cross-platform software at the moment :-)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1