rlogin and subsequent IO communication issue

My application has to use runtime.exec to login to a remote server from a unix environment.

The call to echo out the response hangs.

Here is the code

Process itests =

Runtime.getRuntime().exec("rlogin -l uname tgtSrver ");

InputStreamReader isr =new InputStreamReader(itests.getInputStream());

BufferedReader fromPkMts =new BufferedReader(isr);

OutputStreamWriter osw =

new OutputStreamWriter(itests.getOutputStream());

BufferedWriter toPkMts =new BufferedWriter(osw);

String Line ="";

while((Line = fromPkMts.readLine()) !=null){

System.out.println(Line);

}

[951 byte] By [theresaradkea] at [2007-10-2 6:55:27]
# 1
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
ChuckBinga at 2007-7-16 20:23:26 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...