Thomas said:
Assuming a unix-esque platform?
Well yes, particularly because curses is an old Unix library (a spin-of
of the beloved vi editor: vi's screen control code was factored out into
a library and curses was born).
There's quite a bit of "magic" involved if
its on a mac pre-OSX, for example.
I don't know pre-OS X Macs. Do they have a native library or API for
text console output? If yes, could one wrap that in a JNI wrapper and
use it? Just like the Unix people wrapped curses in a JNI wrapper.
Alternatively, you could first wrap that (assumed) native Mac API into a
curses emulation layer and then that emulation into a JCurses API.
BTW, if there is no text I/O on pre-OS X Macs, why would one develop a
text application for it? And isn't the JVM on this OS rather old? So
maybe Java is not a good choice for this OS at all?
Which meant that you needed to have one on your system to start with. IMO,
this is a far more complicated problem than you're making it sound.
I know that there are C curses/ncurses implementations for Windows. And
Windows definitely doesn't have the Unix termio
terminal interface
structure at all. So if it could be done for Windows, I wouldn't regard
it as impossible for other platforms.
/Thomas
PS: Maybe there is one thing which I didn't express clearly: I am not
promoting Java text UI applications. Java is ill-suited for this, and
any fix requires native libraries, which hinders cross-platform portability.