Hey guys (and gals).
This is a really stupid question. For the life of me, I can't get keyboard input to work for my Java program, which really is a drag when you are trying to create a menu system.
I create a BuffereReader:
BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
I then go try an read a char from the keyboard:
try {i = kbd.read();}
catch (IOException ioe)
{
System.out.println("Can't open Input Stream for Read");
System.out.println("IOError:" + ioe);
break;
}
input = (char) i;
System.out.println(input);
I want to use the input as a character in my program.
My IDE shows that the program is hanging at the try statement...
Thanks for any input (heh heh bad pun
).
edit: updating title, see last post ~10:55 EST thanks
This is a really stupid question. For the life of me, I can't get keyboard input to work for my Java program, which really is a drag when you are trying to create a menu system.
I create a BuffereReader:
BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
I then go try an read a char from the keyboard:
try {i = kbd.read();}
catch (IOException ioe)
{
System.out.println("Can't open Input Stream for Read");
System.out.println("IOError:" + ioe);
break;
}
input = (char) i;
System.out.println(input);
I want to use the input as a character in my program.
My IDE shows that the program is hanging at the try statement...
Thanks for any input (heh heh bad pun
edit: updating title, see last post ~10:55 EST thanks