运行FTPClient listFiles方法时崩溃

问题描述 投票:0回答:1

当我尝试在我的Java程序(已经连接到服务器)中运行方法listFiles时,它会突然崩溃,我接下来会遇到netbeans中的错误:

run:线程“AWT-EventQueue-0”中的异常java.lang.Error:未解决的编译问题:

The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
The import org.apache.oro cannot be resolved
Pattern cannot be resolved to a type
MatchResult cannot be resolved to a type
PatternMatcher cannot be resolved to a type
_matcher_ cannot be resolved
Perl5Matcher cannot be resolved to a type
pattern cannot be resolved
Perl5Compiler cannot be resolved to a type
MalformedPatternException cannot be resolved to a type
result cannot be resolved or is not a field
_matcher_ cannot be resolved
pattern cannot be resolved or is not a field
result cannot be resolved or is not a field
_matcher_ cannot be resolved
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
result cannot be resolved or is not a field
at org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl.<init>(RegexFTPFileEntryParserImpl.java:19)
at org.apache.commons.net.ftp.parser.ConfigurableFTPFileEntryParserImpl.<init>(ConfigurableFTPFileEntryParserImpl.java:57)

. . .

但它汇编了。看起来如果它没有找到org.apache.oro库并且我将它们添加到项目(jakarta-oro-2.0.8),但它仍然在发生。

什么可能是问题的任何想法?

在此先感谢您的帮助,Pablo。

java ant ftp
1个回答
0
投票

我有同样的问题。我能够使用较新版本的commons-net 3.3来解决这个问题

丢弃较旧版本的commons-net应该可以解决问题。

© www.soinside.com 2019 - 2024. All rights reserved.