> We r doing a project on network monitoring using java.
What school / course are you doing this for, curious.
Open socket, get input and output stream.
wrap streams into reader and writer.
write command to writer. read response from reader.
That's essentially it.
They hairy wacky mess comes into play when you want to interpret
screen controls. vt100 vt202 xterm, whatever, etc.
There are a few libraries ported from available C code.
MindTerm a bunch of VT terminal interpreters built in, but you can
find many other ones through freshmeat.net