File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clear Screen

 
Anju Aravind
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would any one mind helping me with one doubt.
How do you print something on to the Dosprompt and
then it should clear the screen and print something
else.
 
Junilu Lacar
Bartender
Pie
Posts: 6558
22
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't tried this myself but this page http://204.56.132.222/Courses/CIS415L/ANSIsys.htm may have the information you need. You need the ANSI.SYS device driver loaded then I suppose you could System.out.print <ESC>[2J

------------------
Junilu Lacar
Sun Certified Programmer for the Java� 2 Platform
 
Anju Aravind
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Junilu Lacar
That was not very clear.
Let me explain a bit more what exactly i want.
if you need to write a program to print the time and it should change on the dosprompt as the time changes ie; i want to clear the screen and print the new time each sec . What is the code for that.
Thanks a lot for your help
Anju Aravind
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this thread
 
kumar abhay
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
i read your question,even though i do not have that much knowledge of java just a begginer but can give you a idea.try double dimenssional array & in that use the ASCII code for space n print it column n row wise & try to print space on DOS PROMPT as the printing of spaces column wise &row wise comes to end,the statement whatever you wish to print ,would be printed.
i hope this would solve your problem.
kumar abhay
 
Anju Aravind
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much guys. that was exactly what I was looking for

Anju Aravind
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic