soot icon indicating copy to clipboard operation
soot copied to clipboard

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

Open Arielwyy opened this issue 2 years ago • 1 comments

I ran the command java -cp soot-4.1.0.jar soot.Main -cp .;rt.jar IFJump and got an error with Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at soot.Timers.<clinit>(Timers.java:33) at soot.Main.run(Main.java:233) at soot.Main.main(Main.java:141) Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 3 more. p.s. My java version is 1.8.0_51

Arielwyy avatar Apr 06 '22 14:04 Arielwyy

You are using the soot library without dependencies. The jar you have is designed to be used in a Java program, e.g. via Apache Maven or Gradle which will automatically add all required dependencies.

What you need is soot-with-dependencies.jar as described in the soot homepage:

http://soot-oss.github.io/soot/#how-do-i-obtain-soot-without-maven

jpstotz avatar Apr 06 '22 15:04 jpstotz