This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CLI based menu

 
W Martin
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i've had to write a menu system for a college java project which has to be done thru the command line. That bit's fine, but i'm wondering is there any command available, or class that deals with, the clearing of the dos window. In other words when they type 'java Menu' for example, the screen clears and you're left with my output at the top of this blank dos window...
Thanks
 
Elouise Kivineva
Ranch Hand
Posts: 154
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could achieve this by printing "\n" about 25 times.
 
rom chatterjee
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Silly question, but why do you want to do this? Personally, I like knowing what has gone before. If it is because of a style choice, then maybe you shouldnt (not everyone may agree with you).
However, if you wish to claer the screen for security reasons, why not have a native script that captures the secure information, clears the screen using the normal shell command, and calls your java program passing the secure information.
Hope this helps!
 
W Martin
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, in this college assignment we got it was specified that the menu system had to be text based, so the idea is to use a series of System.out.prinln() statements to output your choices and accept an integer from the keyboard, but to neaten it up i was hoping there was some way of issuing a DOS 'cls' command from within my java programme, or someway of removing the DOS prompt..for neatness sake
Thanks for the responses
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic