Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
8k views
in Java FTP by (180 points)
I am using dirDetails() method to get the dirDetails from an AS400 FTPServer.
But the retuning the result in the FTPFile[] files array lenght as 0.

List method is working fine and displays the data.

//Example Code.

public static void getDetails(String host,String user,String pwd) throws
IOException,FTPException,ParseException
{
FTPClient client = new FTPClient();

client.setRemoteHost(host);
client.setConnectMode(FTPConnectMode.PASV);
client.setControlEncoding("UTF-8");
client.connect();
client.login(user, pwd);
client.setType(FTPTransferType.BINARY);

// list method works fine.
String list = client.list("/");
System.out.println(list);

// Doen't work :
// Exception while Debugging : org.eclipse.debug.core.DebugException:
//com.sun.jdi.ClassNotLoadedException:
//Type has not been loaded occurred while retrieving component type of array.
// Length is 0.
FTPFile[] files=client.dirDetails("/");
System.out.println(files.length);
}
}

Regrads,
Yogi.

1 Answer

0 votes
by (162k points)
First thing to do is enable logging at the DEBUG level and post the relevant bit of the log file.

Categories

...