aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes getch() and getche() both are not working using JNI in Eclipse built in console widow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "getch() and getche() both are not working using JNI in Eclipse built in console widow" Watch "getch() and getche() both are not working using JNI in Eclipse built in console widow" New topic
Author

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

zainu Mehmood
Ranch Hand

Joined: May 09, 2007
Posts: 45
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

Joined: Oct 27, 2005
Posts: 19781
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getch() and getche() both are not working using JNI in Eclipse built in console widow