commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vijay k v <kvvijay1...@linuxquestions.net>
Subject FTPFile throws NullPointerException!!
Date Sat, 05 Jul 2003 08:18:37 GMT
Hi,


I am usinf the FTPClient class to handle ftp functions in my app.
I tried the following,
FTPClient ftp  = new FTPClient();
ftp.connect(host);
ftp.login(user,password);

I am able to connect to the remote ftp host and perform operations such 
as change directory.

Then i do ..
FTPFile ftpFile[] = ftp.listFiles();

But when i do..
System.out.println(ftpFile.length);

I get a java.lang.NullPointerException

I cant seem to resolve this issue and I have arrived at a stopping point.


Any help will be greatly appreciated.

Regards

Vijay



_____________________________________________________________
Thank you for choosing LinuxQuestions.
http://www.linuxquestions.org

Mime
View raw message