Re: Piping println() through an external pager program (more, less)
Thomas Kellerer wrote:
Thanks for the answer
Piping from the commandline is not possible because the application is
interactive. The user can enter commands and the output of the commands
should be be paged if the user wants that.
You'll almost certainly need some JNI calls to determine the screen
size.. and to detect when it changes too.
Command line programs that are interactive and work "like windows" are
passe at this point, imo. I'm not surprised Sun has not invested any
effort into making them convenient to do in Java.
Have you considered C/C++ and native libs? Any given OS is likely to
support several types of command windows -- good luck actually getting
them all working.
I'd require the user to support and run a GUI so Swing/AWT can be used.
Anything else is just too far beyond the pale these days. Even
servers, I've run into configuration tools that required
X-Windows/KDE/etc. The IT folks who do servers I talk to say the same
-- GUI required for servers these days. And probably have been required
for at least 5 years or so. Tell you customer to get with the program,
or make do with an inferior product, or be prepared to pay a lot to make
up the difference.