Paul states:
What seems to still be missing is the ability to put the invoking terminal in raw mode. What I'd like to do for instance is to write a java clone of 'bash'. I'd like to be able to do something like this:
% java -jar JavaBash.jar;
JavaBash> echo hello world;
hello world
JavaBash>
Where JavaBash allows cmd line editing. With this telnetD package, unless I am wrong, you would have to do something like this:
% java -jar JavaBash.jar -port 2222&
% telnet localhost 2222;
JavaBash> echo Hello world;
It's not quite the same.
The solution, as I implemented it, was to create a 'tunnel' client, that would be responsible to set the terminal in raw I/O mode. Here is one example (not the same that I used in my previous implementation) to have a local client that can talk to the shell program that would be created.
So, yes, Java does not support it natively, but workarounds are available until they are available.
PS: A possible kludge could be for your Java jar to fork a Thread
to Runtime.exec() a telnet invocation to localhost on an ephemeral port on which the other Thread (the Shell) will be listening.

Posted by Paul on June 17, 2004 at 07:51 AM MST #
Posted by Maggie Leber on June 17, 2004 at 09:22 AM MST #