W
Wilson Chew
hi,
Say I am using a Windows machine, can I use Java to programmatically telnet
to a unix machine?
Here's what I did:
String[] cmd = new String[3];
cmd[0] = "cmd.exe";
cmd[1] = "/c";
cmd[2] = "telnet unixMachine";
process = Runtime.getRuntime().exec(cmd);
PrintWriter pr = new PrintWriter(process.getOutputStream());
pr.print("username"); //print username to process
pr.print("password"); //print password to process
This doesn't seems to work. Anybody has experience with this?
Thanks in advance !!
Wilson Chew
Say I am using a Windows machine, can I use Java to programmatically telnet
to a unix machine?
Here's what I did:
String[] cmd = new String[3];
cmd[0] = "cmd.exe";
cmd[1] = "/c";
cmd[2] = "telnet unixMachine";
process = Runtime.getRuntime().exec(cmd);
PrintWriter pr = new PrintWriter(process.getOutputStream());
pr.print("username"); //print username to process
pr.print("password"); //print password to process
This doesn't seems to work. Anybody has experience with this?
Thanks in advance !!
Wilson Chew