Forums Register Login

CLI based menu

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
You could achieve this by printing "\n" about 25 times.
+Pie Number of slices to send: Send
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!
+Pie Number of slices to send: Send
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
Can't .... do .... plaid .... So I did this tiny ad instead:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 699 times.
Similar Threads
Problem while starting Tomcat 4.0:BASEDIR
Exit to MS DOS
Java version
running in dos, not command window in windows
oop-1 Class path
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:17:54.