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

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Tue Mar 4 09:42:27 EST 2014


Hello Ibrahim,

Your code needs to run within a Transformer. Please take the time to
read the documentation a bit more :)

Regards,

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 03/04/2014 04:41 AM, ibrahim elgendy wrote:
> 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?
> 
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list