aspose file tools*
The moose likes Beginning Java and the fly likes Keyboard events without GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Keyboard events without GUI" Watch "Keyboard events without GUI" New topic
Author

Keyboard events without GUI

vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
hi, is there a way to accept input from user without using any GUI interface? My program will take in the key typed by user then responds according to the key typed. All this will be done in Command Prompt and run from JAR file.


I'm not available, my BF's name is WORK.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Have you looked at the java.util.Scanner class?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
yups, using the System.in for the constructor argument. Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Keyboard events without GUI