<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-GB link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hello,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My name is Fotis and I am a PhD student. I am trying to edit the bytecode of a simple class file which has a for loop inside.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I try to use soot but I keep getting error when I am trying to load my file. So in my project directory I have my SimpleLoop( .java and .class) file and my SimpleLoopModSoot(.java and .class) files.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In the SimpleLoopModSoot file, I am trying to grab the SimpleLoop.class file and read the body and its main method. So I start with something simple like:</p><p class=MsoNormal>‘SootClass stClass = Scene.v().loadClassAndSupport(“SimpleLoop”);’</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In order to run the above code, I compile SimpleLoopModSoot.java using javac and then I am typing the following command:<o:p></o:p></p><p class=MsoNormal>`<span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black;background:white'>java -cp ~/Downloads/soot-4.1.0-jar-with-dependencies.jar soot.Main -cp .:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar SimpleLoopModSoot` <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black;background:white'>Or<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black;background:white'>`java -cp ~/Downloads/soot-4.1.0-jar-with-dependencies.jar soot.Main -cp . -pp SimpleLoopModSoot`</span><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I although keep getting the error “soot.SootResolver$SootClassNotFoundException: couldn't find class: SimpleLoop (is your soot-class-path set properly?)”</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have also tried different things to load my class but all the times I am getting the same exception. Some times also I get “couldn’t fine soot.Scene” which is very weird.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I think that this command should work because I can produce a jimple file for the SipleLoop.class file using the command </p><p class=MsoNormal>“java -cp ~/Downloads/soot-4.1.0-jar-with-dependencies.jar soot.Main -cp . -pp -f J SimpleLoop”</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Could you please help me understand what I am doing wrong and I cannot load my Class in SimpleLoopModSoot file?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Best regards,</p><p class=MsoNormal>Fotis</p><p class=MsoNormal> </p></div></body></html>