Network Virtual Terminal for Java

Network Virtual Terminal for Java is a library that can drive a terminal emulator.
Download

Network Virtual Terminal for Java Ranking & Summary

Advertisement

  • Rating:
  • License:
  • The Apache License 2.0
  • Price:
  • FREE
  • Publisher Name:
  • Guglielmo Lichtner
  • Publisher web site:
  • http://www.bway.net/~lichtner/nvt4j.html

Network Virtual Terminal for Java Tags


Network Virtual Terminal for Java Description

Network Virtual Terminal for Java is a library that can drive a terminal emulator. Network Virtual Terminal for Java is a library that can drive a terminal emulator connected to the application through a telnet session.Usage:The API consists of the interface nvt4j.Terminal . The implementation of this class is called nvt4j.impl.Terminal. To allow the user to connect to the application you need to listen for a tcp connection and then wrap a Terminal object around it: ServerSocket serverSocket = new ServerSocket(8000); Socket socket = serverSocket.accept(); Terminal terminal = new nvt4j.impl.Terminal(socket);For example, to run the sample class Example.java from an xterm session, you cando this:user@localhost$ java -classpath nvt4j.jar Example &user@localhost$ telnet localhost 8000NVT4J uses the Telnet LINEMODE option to put the terminal driver (xterm in this case) in what the posix standard calls 'raw' or 'non-canonical' mode, so that it can receive all user inputs asap, instead of waiting for a new-line character.Unfortunately in pure Java there is no way to put the operating system console inraw mode. On Linux and similar systems this is done using the stty command, which is a native program which manipulates the terminal driver in the operating system.What's New in This Release:First alpha release. This code is quite limited but it already provides the basic functions needed to drive a terminal emulator for Java, namely putting the terminal driver in raw mode, turning off the cursor and client-side echo, and detecting the size of the terminal emulator window. This code has been tested only with xterm.


Network Virtual Terminal for Java Related Software