[Soot-list] Beginner Soot CLI Usage / Setup

154 views
Skip to first unread message

Gokce Dilek

unread,
Dec 22, 2020, 1:00:14 AM12/22/20
to soot...@cs.mcgill.ca
Hello,

I am an undergraduate student at UBC, Vancouver. I have recently started looking into Soot for a research project, but I have been having some difficulties in running it from the command line. I followed various guides from herehere, and here, but kept on getting similar error messages, thus, I wanted to ask about the configuration details to the group. I am describing the steps I followed below:

I installed Soot from here. The jar file is located at /Users/gokcedilek/Downloads. I created a sample Java app called A.java in the same directory, which should just print "hello world". My rt.jar file is located at /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/rt.jar. And, I am using macOS Catalina 10.15.5. Based on these, I tried various commands to run Soot, I am summarizing my main steps below:

1) java -cp sootclasses-trunk-jar-with-dependencies.jar soot.Main -f J A --- resulted in java.lang.RuntimeException: Error: cannot find rt.jar.


2) To specify rt.jar: java -cp sootclasses-trunk-jar-with-dependencies.jar soot.Main -cp /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/rt.jar -f J A --- resulted in soot.SootResolver$SootClassNotFoundException: couldn't find class: A (is your soot-class-path set properly?)


3) To specify classpath: java -cp sootclasses-trunk-jar-with-dependencies.jar soot.Main -cp .:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/rt.jar -f J A and java -cp sootclasses-trunk-jar-with-dependencies.jar soot.Main -cp /Users/gokcedilek/Downloads:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/rt.jar -f J A --- both resulted in java.lang.NullPointerException, and I could not solve this error further by googling and trying. 


I would appreciate if you could point me to what I might be missing, or other guides that could be helpful. Thank you very much in advance.


Regards,

Gokce Dilek


 


Patrick Lam

unread,
Dec 24, 2020, 5:19:32 PM12/24/20
to Gokce Dilek, soot...@cs.mcgill.ca

_______________________________________________
Soot-list mailing list
Soot...@CS.McGill.CA
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
Reply all
Reply to author
Forward
0 new messages