Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getch() and getche() both are not working using JNI in Eclipse built in console widow

 
zainu Mehmood
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am facing a strange problem and i really get tired with fighting it...I don't know where i am doing wrong.
Actually i a just want to get the getche() functionilty in my java console application,i mean want to decide on the basis of what user's input charcter without letting him press Enter button.

Everything is just working perfect when i run application from command prompt of Window.But when i run application from Eclipse.It never ask user to enter the character but simply just exit programme by returning -1 value as user's entered value.

Any Idea??
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse and most other IDEs don't have a real console; that's also why System.console() usually returns null. If you need the real console you have no choice but to use the real command line.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic