我在从ftp服务器打印目录时遇到问题我正在使用Net Commons Apache API
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中我得到null。可能是什么问题?
答案 0 :(得分: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