[Soot-list] Exception in thread "main" java.lang.RuntimeException:

ibrahim elgendy eng_elgendy90 at yahoo.com
Tue Mar 4 04:41:56 EST 2014


import soot.Body;
import soot.Scene;
import soot.SootClass;
import soot.SootMethod;
import soot.Unit;
import soot.ValueBox;
public class test {

public static void main(String []args){

SootClass sc=Scene.v().getSootClass("Test_soot");
SootMethod sm=sc.getMethodByName("mm");

Body body=sm.getActiveBody();
for (Unit ut : body.getUnits())
{ for (ValueBox vb : ut.getUseBoxes()){
if( vb.getValue().equals("x") )
System.out.println(vb);
}
}  }  }

i am new with using soot and when i try to write my code to read Test_soot class (also my class) to get the body of method with name mm and search about variable with name x


it give this exception

Exception in thread "main" java.lang.RuntimeException: 
Aborting: can't find classfile Test_soot
at soot.Scene.getSootClass(Scene.java:720)
at test.main(test.java:12)

what is the error of my code? and how to fix it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140304/2fdb12f7/attachment.html 


More information about the Soot-list mailing list