[Soot-list] Scene.v().getClasses = empty. How cand I load classes in the Scene without exceptions?

Laurențiu Dascălu dascalu.laurentziu at gmail.com
Mon Apr 19 18:07:42 EDT 2010


Hello,

On 20.04.2010 00:00, Cristina Ilie wrote:
> The problem is that at this point in Scene no class is loaded. G.v().out.println(Scene.v().getClasses()) returns []. I see loadClassAndSupport iterates on a worklist which contains necessary classes and the classes given in the command line. But Scene is empty and SootResolver throws an exception (line 174). I tried also with loadBasicClass in my Main and Scene.v().getClass("java.lang.Math") in "static { ...}" but it doesn't work.
>
> In internalTransform Scene.v().getClasses() returns all the needed classes, including my test class (AppSource). I guess this code performs after the code "static {..}". How can I load the classes in the Scene without exceptions?

I'm new to soot, but I think you should load the classes before doing 
something with Scene.v();

Scene.v().loadClassAndSupport("java.lang.Object");
etc.

Also, before loading make sure that your sootClassPath is valid.

-- 
Laurențiu Dascălu



More information about the Soot-list mailing list