Git Product home page Git Product logo

Comments (7)

gotson avatar gotson commented on May 27, 2024

Slf4j is a facade , you can use whatever implementation you want.

from junrar.

gotson avatar gotson commented on May 27, 2024

Also check http://www.slf4j.org/faq.html#optional_dependency

from junrar.

gotson avatar gotson commented on May 27, 2024

You did not describe the symptom, only mentioned reproduction steps. Can you clarify the symptoms you experience?

from junrar.

Mingun avatar Mingun commented on May 27, 2024

Thank you for your help! I see you points and find them reasonable. Actually, I see that logging facade is small and it shouldn't cause rejection in those who seek to keep theirs programs as small as possible.

One thing I still think need to be done: mention in readme that you also need to add dependency to the slf4j-api-<version>.jar, because otherwise NoClassDefFoundError("org/slf4j/LoggerFactory") thrown when you try to use Archive class

from junrar.

gotson avatar gotson commented on May 27, 2024

It should not be needed. Can you provide a reproduction repo?

from junrar.

Mingun avatar Mingun commented on May 27, 2024

Yes, if you use modern build systems, such as maven or gradle that downloads necessary dependency automatically, you will not face with the problem. However I support project which uses old good ant and all dependencies is resolving manually.

I attach small ant project issue64.zip and you can see that it is failed with

$ ant -f /home/mingun/Projects/issue64 -Dnb.internal.action.name=run run
init:
deps-jar:
Created dir: /home/mingun/Projects/issue64/build
Updating property file: /home/mingun/Projects/issue64/build/built-jar.properties
Created dir: /home/mingun/Projects/issue64/build/classes
Created dir: /home/mingun/Projects/issue64/build/empty
Created dir: /home/mingun/Projects/issue64/build/generated-sources/ap-source-output
Compiling 1 source file to /home/mingun/Projects/issue64/build/classes
compile:
run:
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
	at com.github.junrar.Archive.<clinit>(Archive.java:81)
	at ru.mingun.Isssue64.main(Isssue64.java:9)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 2 more
/home/mingun/Projects/issue64/nbproject/build-impl.xml:1355: The following error occurred while executing this line:
/home/mingun/Projects/issue64/nbproject/build-impl.xml:961: Java returned: 1
BUILD FAILED (total time: 0 seconds)

from junrar.

gotson avatar gotson commented on May 27, 2024

Hmm. Build systems that don't support transitive dependencies.

Well, glad you sorted it out. I don't plan on adding more information on the Readme, people using outdated buidl systems ought to know where to look to find transitive dependencies on the libraries they use.

from junrar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.