-1

I need to be able to get input without the user pressing enter in java. As far as I can tell this cannot be done without JNI/JNA which I would like to avoid. So I am looking for a small program that could do this for me and then undo it when called again (with different arguments maybe?) It can be in any language (preferably a compiled one), but preferably it could be compiled without MS visual studio because I would rather not install that.

Basically is there a windows equivalent of stty raw that I could call from Java?

Tookmund
  • 103
  • 1
  • 7

1 Answers1

0

You will definitely still need JNI. Many libraries already exist for this however. You can try JCurses here: http://sourceforge.net/projects/javacurses/ however it has not been updated in a 3 years!

I believe if you are on UNIX/Linux that Lanterna (https://code.google.com/p/lanterna/) also has something for this purpose (and it's also a lot more up to date and easy to use).

I don't think anything more specific and lightweight exists without you having to write one yourself.

nulldev
  • 555
  • 6
  • 16