Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/307.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java “中的JUNG例外”;主要内容:org/apache/commons/collections/Predicate_Java_Eclipse_Noclassdeffounderror_Jung_Generic Collections - Fatal编程技术网

Java “中的JUNG例外”;主要内容:org/apache/commons/collections/Predicate

Java “中的JUNG例外”;主要内容:org/apache/commons/collections/Predicate,java,eclipse,noclassdeffounderror,jung,generic-collections,Java,Eclipse,Noclassdeffounderror,Jung,Generic Collections,我开始学习Java通用网络/图形框架(JUNG)。我正试图用同样的方法构建一个基本图。我下载了jung 2.0.1库。collections-generic-4.0.1.jar和colt-1.2.0.jar。我将所有包含的库添加到我的eclipse项目构建路径中。但每当我尝试运行时,我都会遇到以下异常 这让我想到是collections-generic-4.0.1.jar造成的。所以我提取了它,发现其中的包结构是org/apache/commons/collections15/Predica

我开始学习Java通用网络/图形框架(JUNG)。我正试图用同样的方法构建一个基本图。我下载了jung 2.0.1库。collections-generic-4.0.1.jar和colt-1.2.0.jar。我将所有包含的库添加到我的eclipse项目构建路径中。但每当我尝试运行时,我都会遇到以下异常


这让我想到是collections-generic-4.0.1.jar造成的。所以我提取了它,发现其中的包结构是org/apache/commons/collections15/Predicate,而不是org/apache/commons/collections/Predicate。这是造成问题的原因吗?在此方面的任何帮助都将不胜感激……

请在代码中编写此代码,以指定谓词类的来源:

import org.apache.commons.collections15.*
或者,如果您可能需要包中的其他类:

此外,您还可以提取.jar文件,并使用
谓词
类的正确路径创建一个新文件

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/collections/Predicate
    at grapheditor.SimplestGraph.main(SimplestGraph.java:17)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Predicate
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 1 more
import org.apache.commons.collections15.Predicate
import org.apache.commons.collections15.*