Solution 1 :
Using ftp4j was a bad idea, i think its not mature enough instead of this i replaced my code and started using Apache Commons lib that works smoothly.
Problem :
I’m using ftp4j lib to upload download files from a server through an FTP Client. While retrieving the files list it’s giving an error.
My code is:
int port = 21;
String server = getResources().getString(R.string.FTPServer);
String username = getResources().getString(R.string.FTPUser);
String password = getResources().getString(R.string.FTPPwd);
String remotePath = "/";
FTPClient ftpClient = new FTPClient(); //ftp clientimiz
ftpClient.setType(FTPClient.TYPE_BINARY);
ftpClient.connect(server, port);
// ftpClient.setPassive(true);
ftpClient.login(username, password);
ftpClient.changeDirectory(remotePath);
FTPFile[] list = ftpClient.list();
Error details are shown in the following image:
FileZilla is listing files correctly, kindly suggest a solution.