General Options: -coffi Use the good old Coffi front end for parsing Java bytecode (instead of using ASM). -jasmin-backend Use the Jasmin back end for generating Java bytecode (instead of using ASM). -h, -help Display help and exit -pl, -phase-list Print list of available phases -ph ARG -phase-help ARG Print helpfor specified ARG -version Display version information and exit -v, -verbose Verbose mode -interactive-mode Run in interactive mode ...
java.nio.file.NotDirectoryException: /modules/modules at java.base/jdk.internal.jrtfs.JrtDirectoryStream.<init>(JrtDirectoryStream.java:59) at java.base/jdk.internal.jrtfs.JrtPath.newDirectoryStream(JrtPath.java:642) at java.base/jdk.internal.jrtfs.JrtFileSystemProvider.newDirectoryStream(JrtFileSystemProvider.java:309) at java.base/java.nio.file.Files.newDirectoryStream(Files.java:476) at soot.asm.AsmJava9ClassProvider.find(AsmJava9ClassProvider.java:50) at soot.SourceLocator.getClassSource(SourceLocator.java:187) at soot.Scene.tryLoadClass(Scene.java:967) at soot.Scene.loadBasicClasses(Scene.java:1708) at soot.Scene.loadNecessaryClasses(Scene.java:1807) at soot.Main.run(Main.java:241) at soot.Main.main(Main.java:141) ......
查询了issue,并没有发现一样的报错,但是有一个issue说:
There is no rt.jar in Java versions newer than 8. Soot has a feature to load classes from the new module file system. Have a look at the ModuleScene.
更新soot到了4.4.0的版本,出现了新的报错:
1 2 3 4 5 6
$ java -cp soot.jar soot.Main test1 SLF4J: No SLF4J providers were found. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details. Soot started on Wed Mar 29 11:52:55 CST 2023 soot.SootResolver$SootClassNotFoundException: couldn't find class: test1 (is your soot-class-path set properly?)
查找问题是没有设置CLASSPATH,加上-cp的参数后,出现新的报错:
1 2 3 4 5 6
$ java -cp soot.jar soot.Main -cp . test1 SLF4J: No SLF4J providers were found. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details. Soot started on Wed Mar 29 11:54:45 CST 2023 java.lang.RuntimeException: None of the basic classes could be loaded! Check your Soot class path!