I've been playing around with running the edtftpj library under PersonalJava (on the Jeode VM that comes with my IPAQ 5550), and have been successful with getting a directory listing from a remote FTP site. However, in order for me to do this, I had to make a couple of minor changes to the FTPClient class. I thought you might like to know what they were, in order to possibly integrate them into the main product.
In the
FTPClient.dir(String, boolean) method, you will need to change the line (approx 20 up from the method end) that reads:
lines.add(line);
to:
lines.addElement(line);
and then you will need to change the code at the end of the method to somethnig like this:
if (!lines.isEmpty()) {
try {
result = (String[])lines.toArray(result);
} catch (NoSuchMethodError nsme) {
result = new String[lines.size()];
for (int i = 0; i < result.length; i++) {
result[i] = lines.elementAt(i).toString();
}
}
}
}
return result;
As I said, with these changes I was able to use your library on my iPAQ, so I hope you will consider them to be of value.
Regards,
Rus,
Bristol, UK