Hi,
I am starting out writing a FTP client.
String host = "hostname";
String user = "testuser";
String password = "mango";
FTPClient ftp = null;
ftp = new FTPClient();
ftp.setRemoteHost(host);
FTPMessageCollector listener = new FTPMessageCollector();
ftp.setMessageListener(listener);
// connect
System.out.println("Connecting");
ftp.connect();
System.out.println("Logging in");
ftp.login(user, password);
When I run this, its prints out "Connecting" and then I get this exception:
java.net.ConnectException: Connection refused: connect
What could be wrong? This code is from the demo program that came with the download..