<div dir="ltr"><div>Try this:</div><div><br></div><div><a href="https://github.com/soot-oss/soot/issues/1101">https://github.com/soot-oss/soot/issues/1101</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 22, 2020 at 7:00 PM Gokce Dilek <<a href="mailto:gokcedilek99@gmail.com">gokcedilek99@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><font face="arial, sans-serif" color="#000000">Hello,</font><div><font face="arial, sans-serif" color="#000000"><br></font></div><div><font face="arial, sans-serif" color="#000000">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 <a href="https://www.brics.dk/SootGuide/sootsurvivorsguide.pdf" target="_blank">here</a>, <a href="https://github.com/soot-oss/soot/wiki/Introduction:-Soot-as-a-command-line-tool#soots-command-line" target="_blank">here</a>, and <a href="http://www.bodden.de/2008/08/21/soot-command-line/" target="_blank">here</a>, 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:</font></div><div><font face="arial, sans-serif" color="#000000"><br></font></div><div><font color="#000000"><font face="arial, sans-serif">I installed Soot from </font><a href="https://soot-build.cs.uni-paderborn.de/public/origin/master/soot/soot-master/3.0.1/build/sootclasses-trunk-jar-with-dependencies.jar" style="font-family:arial,sans-serif" target="_blank">here</a><font face="arial, sans-serif">. The jar file is located at </font><span style="font-variant-ligatures:no-common-ligatures"><font face="times new roman, serif">/Users/gokcedilek/Downloads</font><font face="arial, sans-serif">. 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 </font></span><span style="white-space:pre-wrap"><font face="times new roman, serif">/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/rt.jar</font></span><span style="font-family:arial,sans-serif;white-space:pre-wrap">. And, I am using macOS Catalina </span></font><font face="arial, sans-serif">10.15.5. <span style="white-space:pre-wrap;color:rgb(0,0,0)">Based on these, I tried various commands to run Soot, I am summarizing my main steps below:</span></font></div><div><span style="white-space:pre-wrap"><font face="arial, sans-serif" color="#000000"><br></font></span></div><div>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font color="#000000"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, sans-serif">1) </font><font face="tahoma, sans-serif">java -cp sootclasses-trunk-jar-with-dependencies.jar soot.Main -f J A</font><font face="arial, sans-serif"> --- resulted in </font></span><span style="font-variant-ligatures:no-common-ligatures"><font face="tahoma, sans-serif">java.lang.RuntimeException: Error: cannot find rt.jar.</font></span></font></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, sans-serif" color="#000000"><br></font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font color="#000000"><span style="font-family:arial,sans-serif;font-variant-ligatures:no-common-ligatures">2) To specify rt.jar: </span><span style="font-variant-ligatures:no-common-ligatures"><font face="tahoma, sans-serif">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</font><font face="arial, sans-serif"> --- resulted in </font></span><span style="font-variant-ligatures:no-common-ligatures"><font face="tahoma, sans-serif">soot.SootResolver$SootClassNotFoundException: couldn't find class: A (is your soot-class-path set properly?)</font></span></font></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, sans-serif" color="#000000"><br></font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font color="#000000"><span style="font-family:arial,sans-serif;font-variant-ligatures:no-common-ligatures">3) To specify classpath: </span><font face="tahoma, sans-serif"><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">java -cp sootclasses-trunk-jar-with-dependencies.jar soot.Main -cp .:</span><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/rt.jar</span></font><span style="font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><font face="tahoma, sans-serif"> -f J A </font><font face="arial, sans-serif">and </font></span><span style="white-space:pre-wrap"><font face="tahoma, sans-serif">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</font></span><span style="font-family:arial,sans-serif;white-space:pre-wrap"> --- both resulted in</span><span style="font-family:"times new roman",serif;white-space:pre-wrap"> </span><font face="tahoma, sans-serif"><span style="font-variant-ligatures:no-common-ligatures">java.lang.NullPointerException</span><span style="font-variant-ligatures:no-common-ligatures">, </span></font><span style="font-family:arial,sans-serif;font-variant-ligatures:no-common-ligatures">and I could not solve this error further by googling and trying. </span></font></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, sans-serif" color="#000000"><br></font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, sans-serif" color="#000000">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.</font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, sans-serif" color="#000000"><br></font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif" color="#000000"><span style="font-variant-ligatures:no-common-ligatures">Regards,</span></font></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, sans-serif" color="#000000"><span style="font-variant-ligatures:no-common-ligatures">Gokce Dilek</span></font></p>
<br><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> </span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p>
</div>
</div>
_______________________________________________<br>
Soot-list mailing list<br>
<a href="mailto:Soot-list@CS.McGill.CA" target="_blank">Soot-list@CS.McGill.CA</a><br>
<a href="https://mailman.CS.McGill.CA/mailman/listinfo/soot-list" rel="noreferrer" target="_blank">https://mailman.CS.McGill.CA/mailman/listinfo/soot-list</a><br>
</blockquote></div>