2021年3月14日 06:20,Andreas Peter Dann <ad...@mail.uni-paderborn.de> 写道:Hi Yuan,
thanks for your question. Unfortunately, the current documentation is not very clear on that topic because only a few people used Soot to analyze ByteCode for Java Version >= 9.
At the end of the readme in the repo you'll find paragraph explaining how to run soot with Java >=9
https://github.com/soot-oss/soot
In a nutshell,
- please use the latest version from Maven Central https://soot-oss.github.io/soot/
- run soot with a JDK >= 8 (maybe it works with an older JDK but I've never tested it)
- if you want to run soot on JDK 8 but want to analyze the ByteCode of Java >=9 please run
java -cp soot-trunk.jar soot.Main -cp VIRTUAL_FS_FOR_JDK
the string VIRTUAL_FS_FOR_JDK tells Soot to look into the virtual file system of JDKs >=9 to find the base classes.
Please feel free to improve the current documentation by making a pull request.
Best,
Andreas
---------
Am 12.03.21, 01:20 schrieb "Soot-list im Auftrag von Liu Yuan" <soot-lis...@CS.McGill.CA im Auftrag von liu...@fastmail.com>:
Hi,
when you execute soot on JDK 8 and want to analyze bytecode >= JDK 9 using a classpath but not the modulepath feature
then configure soot as follows
Options.v().set_prepend_classpath(true);
Options.v().set_process_dir(Arrays.asList(applicationClassPath().split(File.pathSeparator)));
Options.v().set_claspath(sootClassPath());
Best,
Andreas
IF you get any errors than please open an issue in Soot and post the whole error log there.