T
Thomas Kellerer
Hi,
I have a console application ("commandline") that is writing text to the console
using System.out.println (I'm *not* referring to the "Java Console" that is
started when an applet is started)
I would like to support paging of the output, but I can't find a way to do it.
My first approach was to try to find the current size of the console, but this
does not seem to be possible in a cross-platform manner (in pure Java)
So I thought I could simply write my output to a spawned "pager" process ("print
ln() | more") but I can't get this to work either.
I tried the example from http://mindprod.com/jgloss/exec.html and even though
the output is shown on screen, the pager (in my case "more" under Windows) does
not kick in and I don't see the prompt to press enter to see the next page.
I tried several combinations of using Process.getInputStream() and
Process.getOutputStream() (and mingling with System.out and System.in) but
either I can't see the output or the output is not paged.
Any ideas?
Thanks
Thomas
I have a console application ("commandline") that is writing text to the console
using System.out.println (I'm *not* referring to the "Java Console" that is
started when an applet is started)
I would like to support paging of the output, but I can't find a way to do it.
My first approach was to try to find the current size of the console, but this
does not seem to be possible in a cross-platform manner (in pure Java)
So I thought I could simply write my output to a spawned "pager" process ("print
ln() | more") but I can't get this to work either.
I tried the example from http://mindprod.com/jgloss/exec.html and even though
the output is shown on screen, the pager (in my case "more" under Windows) does
not kick in and I don't see the prompt to press enter to see the next page.
I tried several combinations of using Process.getInputStream() and
Process.getOutputStream() (and mingling with System.out and System.in) but
either I can't see the output or the output is not paged.
Any ideas?
Thanks
Thomas