I've been looking into how to interact with the terminal in a
NetBeans Platform application. The simplest approach
is described here, from sometime ago, which gives you a native
terminal embedded in your NetBeans Platform application, but does
not let you interact with it, i.e., listen to key strokes. That may
be fine for your purposes, in which case forget the rest of this
blog entry.
However, to get more control over the embedded native terminal,
quite a bit more work needs...