You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Fabio Cuomo <mu...@hotmail.com> on 2004/03/23 23:20:45 UTC
Please Help me !! listFiles() return null
Hi at all....
I'm developing an application that support file transfer using ftp ....
particularly it is possible to send and receive file more list all
information files or directory. To do this i use listFiles() method of class
FTPClass, as follow:
FTPClient ftp = new FTPClient();
ftp.connect(host);
ftp.login(dbuser, pwd);
FTPFile[] filelist = ftp.listFiles();
for (int i = 0; i < filelist.length; ++i)
System.out.println(filelist[i]);
ftp.disconnect();
... but on i get a null pointer. Please, can somebody tell me if this is a
recognized bug or if i wrong in something ?? Please help me i'm in
trouble..Any kind of help is granted.
Thanx in advance.
regards mulp
_________________________________________________________________
MSN Extra Storage elimina i virus dalla tua posta! Provalo!
http://join.msn.com/?pgmarket=it-it&page=hotmail/es
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: Please Help me !! listFiles() return null
Posted by Tomasz Pik <pi...@ais.pl>.
Fabio Cuomo wrote:
> Hi at all....
> I'm developing an application that support file transfer using ftp ....
> particularly it is possible to send and receive file more list all
> information files or directory. To do this i use listFiles() method of
> class FTPClass, as follow:
>
> FTPClient ftp = new FTPClient();
> ftp.connect(host);
> ftp.login(dbuser, pwd);
> FTPFile[] filelist = ftp.listFiles();
> for (int i = 0; i < filelist.length; ++i)
> System.out.println(filelist[i]);
> ftp.disconnect();
>
> ... but on i get a null pointer.
Any stack trace... In which line of your code?
[...]
Regards,
Tomek
> regards mulp
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org