Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/384.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.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 与slf4j库相关的编译问题_Java_Eclipse_Slf4j_Mahout - Fatal编程技术网

Java 与slf4j库相关的编译问题

Java 与slf4j库相关的编译问题,java,eclipse,slf4j,mahout,Java,Eclipse,Slf4j,Mahout,我试图编译一个开源库,但遇到了以下问题。当我保留这两个库slf4j-jcl-1.6.0.jar和slf4j-api-1.6.0.jar时,eclipse编译器将给我以下错误消息: SLF4J:类路径包含多个SLF4J绑定。 SLF4J:在[jar:file:/home/chengs6/mahout/mahout-distribution-0.5/mahout-examples-0.5-job.jar!/org/SLF4J/impl/StaticLoggerBinder.class]中找到绑定 S

我试图编译一个开源库,但遇到了以下问题。当我保留这两个库slf4j-jcl-1.6.0.jar和slf4j-api-1.6.0.jar时,eclipse编译器将给我以下错误消息:

SLF4J:类路径包含多个SLF4J绑定。 SLF4J:在[jar:file:/home/chengs6/mahout/mahout-distribution-0.5/mahout-examples-0.5-job.jar!/org/SLF4J/impl/StaticLoggerBinder.class]中找到绑定 SLF4J:在[jar:file:/home/chengs6/mahout/mahout-distribution-0.5/lib/SLF4J-jcl-1.6.0.jar!/org/SLF4J/impl/StaticLoggerBinder.class]中找到绑定

如果我删除这两个库,编译器将给出以下错误消息:

2011年6月15日下午2:51:12 org.slf4j.impl.jcllogger适配器错误


如何解决这个问题?谢谢。

SLF4J只需要在类路径中有
SLF4J-api-1.6.0.jar和一个记录器实现。这是政府所说的:

请注意,SLF4J启用 库/应用程序意味着 仅添加一个强制选项 依赖性,即
slf4j-api-1.6.1.jar

就你而言,我想你有。在我看来,
mahout-examples-0.5-job.jar
已经包含了一些SLF4J实现类