Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
8.1k views
in Java FTP by (160 points)
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

2 Answers

0 votes
by (162k points)
Thanks for these. Looks like the Jeode VM might be equivalent to 1.1.x? We are *almost* compatible with 1.1.x so we'll look into making these changes - it would mean edtFTPj would run in the MS JVM as well (I think).

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.
0 votes
by (160 points)
Thanks for these. Looks like the Jeode VM might be equivalent to 1.1.x? We are *almost* compatible with 1.1.x so we'll look into making these changes - it would mean edtFTPj would run in the MS JVM as well (I think).


Yes, the PersonalJava (and therefore Jeode) API is a subset of the 1.1.x APIs. PersonalJava has been superceeded by the J2ME APIs, but I haven't checked into the compatibility with edtFTPj - there are a lot of possible combinations of J2ME configurations, so different requirements would apply for each config.

As for MS compatibility, I'll leave that for MS to test! :lol:

Categories

...