سؤال

I was working on creating my first Xuggler media application. I was coding by watching their video on how to create the first media application.

Code

package demo;

import com.xuggle.xuggler.IContainer;

public class GetContainerInfo {
    public static void main(String[] args) {
        if(args.length!=1){
            throw new IllegalArgumentException("no file");
        }
        IContainer container = IContainer.make();
        if(container.open(args[0],IContainer.Type.READ,null)<0){
            throw new IllegalArgumentException("could not open");
        }
    }
}

Error

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.  

Do I have the dependencies?

Yes, I do! I have all the dependencies. I imported them while creating the project.
Image:
enter image description here

What is causing that error and how do I solve it?

هل كانت مفيدة؟

المحلول

From SLF4J manual:

> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J:
> See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
> details.

This warning is printed because no slf4j binding could be found on your class path. The warning will disappear as soon as you add a binding to your class path. Assuming you add slf4j-simple-1.7.2.jar so that your class path contains: slf4j-api-1.7.2.jar slf4j-simple-1.7.2.jar ...

نصائح أخرى

Cause Could be un-availability of dependency jars or version conflicts.

Adding the following jars in the class path worked fine for me:

xuggle-xuggler-5.4.jar
slf4j-api-1.6.4.jar
logback-core-1.0.0.jar
logback-classic-1.0.0.jar

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top