-1

我在使用 Net Commons Apache API 从 ftp 服务器打印目录时遇到问题

FtpClient  ftpclient=new FtpClient();
ftpclient.connect("garbo.uwasa.fi");
System.out.println("this is reply code"+ftpclient.getReplyCode());

最后一条语句给出replycode=220

 String workingdirectory=ftpclient.printWorkingDirectory();

在 printdirectory 我得到空值。可能是什么问题呢?

4

1 回答 1

1
FtpClient client=new FtpClient();
clent.connect("www.ftpserver.com");
clent.login("username","password");
String workingdirectory=ftp.printWorkingDirectory();
this working code so u can access ftp server by using this
于 2012-05-08T12:04:45.063 回答