使用serv-u做ftp服务器,common.net.ftp组件,
String a =ftpClient.getSystemName();得到的返回值是:UNIX Type: L8;返回的是在Serv-u的domains的settings里Message项的SYST Command reply的内容;
String b = ftpClient.printWorkingDirectory();是返回值是:/e:/FTPtestLocal/User,是不是因为认到的是Serv-u是基于UNIX的内核,所以路径前又加了“/”??
FTPFile[] remoteFiles = ftpClient.listFiles();
System.out.println("目录" + remoteDir + "下的文件:");
if(remoteFiles != null) { ...
会抛出:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/oro/text/regex/MalformedPatternException
at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createUnixFTPEntryParser(DefaultFTPFileEntryParserFactory.java:169)
at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:94)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2358)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2141)
at com.lh.FTPtest.ListFtpFile.login(ListFtpFile.java:68)
at com.lh.FTPtest.ListFtpFile.main(ListFtpFile.java:22)有没有高人遇到过,怎么解决,谢谢!!!!分不多了,谢谢!!
String a =ftpClient.getSystemName();得到的返回值是:UNIX Type: L8;返回的是在Serv-u的domains的settings里Message项的SYST Command reply的内容;
String b = ftpClient.printWorkingDirectory();是返回值是:/e:/FTPtestLocal/User,是不是因为认到的是Serv-u是基于UNIX的内核,所以路径前又加了“/”??
FTPFile[] remoteFiles = ftpClient.listFiles();
System.out.println("目录" + remoteDir + "下的文件:");
if(remoteFiles != null) { ...
会抛出:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/oro/text/regex/MalformedPatternException
at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createUnixFTPEntryParser(DefaultFTPFileEntryParserFactory.java:169)
at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:94)
at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2358)
at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2141)
at com.lh.FTPtest.ListFtpFile.login(ListFtpFile.java:68)
at com.lh.FTPtest.ListFtpFile.main(ListFtpFile.java:22)有没有高人遇到过,怎么解决,谢谢!!!!分不多了,谢谢!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货