Terminal app

M

mnml

Hi,
I am trying to code a terminal application. I would like to know if
there is "something" I can use from the java Api to avoid redrawing
all the characters on the screen.
thanks
 
G

Gordon Beaton

I am trying to code a terminal application. I would like to know if
there is "something" I can use from the java Api to avoid redrawing
all the characters on the screen.

Most terminal applications never need to redraw the whole screen or
even parts of it. Maybe you had something more advanced in mind than a
line-based application?

From an old post, no idea of their status:

http://www.bmsi.com/tuipeer/
http://sourceforge.net/projects/javacurses/
http://www.pitman.co.za/projects/charva/index.html
http://java-readline.sourceforge.net/

/gordon

--
 
N

Nigel Wade

mnml said:
Hi,
I am trying to code a terminal application. I would like to know if
there is "something" I can use from the java Api to avoid redrawing
all the characters on the screen.
thanks

T

I have no idea if this is the sort of thing you are looking for, but have a look
for yourself:
http://sourceforge.net/projects/javacurses

I have never use the above, but I have in the past used the UNIX curses library
which is/was a library for addressing text based terminals/consoles in a
"graphical" way.
 
M

mnml

Most terminal applications never need to redraw the whole screen or
even parts of it. Maybe you had something more advanced in mind than a
line-based application?

From an old post, no idea of their status:

http://www.bmsi.com/tuipeer/
http://sourceforge.net/projects/javacurses/
http://www.pitman.co.za/projects/charva/index.html
http://java-readline.sourceforge.net/

/gordon

--

thanks for the links, yes it need to redraw the whole screen (it's a
game), I wondering if it's possible to do that without any external
libs.
 
M

Martin Gregorie

Nigel said:
T

I have no idea if this is the sort of thing you are looking for, but have a look
for yourself:
http://sourceforge.net/projects/javacurses

I have never use the above, but I have in the past used the UNIX curses library
which is/was a library for addressing text based terminals/consoles in a
"graphical" way.
This may not be what the OP wants. I just downloaded it to take a look.
There is almost no documentation apart from Javadocs output from the
classes, i.e. no really explanatory overview and no example code. It
looks to me as it if its meant to be an exact analogue of the C curses
library, allowing a Java program to handle screens and forms on a
console screen rather than painting it inside an AWT or Swing window.

To the OP: from this description is this what you want or are you
looking for code that emulates a text terminal within a Swing JPanel?

If the latter, I wrote a Java glass teletype emulation that was capable
of keeping up with my typing and with data coming in on a 9600 baud
serial connection. It could handle a remote interactive login session
with no noticeable delays when run on a 300 MHz PII box. I used an 80 x
25 JTextArea to represent the screen and handled writing to it by
manipulating the text content of the JTextArea.
 
N

Nigel Wade

Martin said:
This may not be what the OP wants. I just downloaded it to take a look.
There is almost no documentation apart from Javadocs output from the
classes, i.e. no really explanatory overview and no example code. It
looks to me as it if its meant to be an exact analogue of the C curses
library, allowing a Java program to handle screens and forms on a
console screen rather than painting it inside an AWT or Swing window.

I assumed from what the OP said that "terminal application" was an application
running within a terminal, and "redrawing all the characters on the screen" is
exactly what curses did for you.

The description in the original post was limited, so we have to fill in the gaps
and guess what was intended. Because of that I didn't download any info on the
package, I left that as an exercise for the OP...
 
M

Martin Gregorie

Nigel said:
I assumed from what the OP said that "terminal application" was an application
running within a terminal, and "redrawing all the characters on the screen" is
exactly what curses did for you.

The description in the original post was limited, so we have to fill in the gaps
and guess what was intended. Because of that I didn't download any info on the
package, I left that as an exercise for the OP...
I took a look because, if it would do things like emulating a VT-100,
xterm or wyse-120 terminal inside a GUI window, I may well have a use
for it. But I don't think it will do that.

Instead, it looks as if its targeted on allowing Java to do curses-type
things without needing a GUI interface (i.e. you could use it in a DOS
box, Linux or X-term console, or even on a physical character-mode
terminal (VT-100, Wyse-120 etc.).

However, it if can read, parse and interpret a termcap definition I can
at least swipe some code from it to glue on the back of my JTextArea
screen emulation. At some point I know I'll need an application that
emulates a terminal while using a socket connection to talk to some
emulated hardware running an OS that thinks its using a serial port.
 
R

RedGrittyBrick

Martin Gregorie wrote:

I took a look because, if it would do things like emulating a VT-100,
xterm or wyse-120 terminal inside a GUI window, I may well have a use
for it. But I don't think it will do that.

Instead, it looks as if its targeted on allowing Java to do curses-type
things without needing a GUI interface (i.e. you could use it in a DOS
box, Linux or X-term console, or even on a physical character-mode
terminal (VT-100, Wyse-120 etc.).

However, it if can read, parse and interpret a termcap definition I can
at least swipe some code from it to glue on the back of my JTextArea
screen emulation. At some point I know I'll need an application that
emulates a terminal while using a socket connection to talk to some
emulated hardware running an OS that thinks its using a serial port.

JTA is a Java applet that emulates an ANSI terminal. I believe the API
can be used for other applications too.

http://javassh.org/space/Docs+and+Tutorials
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top