我正在尝试使用 JWNL 访问 Wordnet。
public static void main(String[] args) throws JWNLException {
// Initialize the database
WordNetHelper.initialize("file_properties.xml");
}
在初始化 file_properties.xml 的行中获取运行时异常,其中显示: “线程“main”java.lang.NoClassDefFoundError 中出现异常:org/apache/commons/logging/LogFactory”
我已将文件配置为指向字典文件,方法是将路径指定为: “C:\Program Files (x86)\WordNet\3.0\dict”
请帮忙!
最佳答案
看起来像是类路径中缺少 jar 的情况。
将 lib/commons-logging.jar 添加到类路径。
应该可以解决你的问题。
关于java - 通过 JWNL 使用 wordnet 时出现运行时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20252963/