使用Commons-net包编写FTP客户端出现异常。
使用Commons-net包编写FTP客户端出现异常。
ftp = new FTPClient();ftp.connect(FTP_SERVER_HOST, FTP_SERVER_PORT);// 登录ftp.login(FTP_SERVER_USER, FTP_SERVER_PASS);reply = ftp.getReplyCode();System.out.println(reply);if (!FTPReply.isPositiveCompletion(reply)) { ftp.disconnect(); System.err.println("FTP server refused connection."); System.exit(1);}