[Soot-list] soot.AbstractSootFieldRef$FieldResolutionFailedException

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Tue Oct 19 11:21:24 EDT 2010


> I am trying to generate XML output of a bunch of class files using soot. I
> am just using your JAnalyzer as a sample source of bunch of class files.

Oh, I see. In this case, Soot (2.4.0) should not be on Soot's classpath anyway.

> By the way, now I am sure that the cause I mentioned is the previous email
> is indeed the cause of the problem. Because as a test, I manually excluded
> soot 2.4.0 from my soot's class path (but kept in Java's classpath) and then
> ran my program and it worked. But what I want to know is that is there any
> way by which I can separate Java's and soot's classpath in a well organized
> way , rather than manually excluding like what I have done ?
> Can you write me a sample example ?

Actually, if you configure Soot correctly, Soot already does
completely separate itself from the analyzed classes. There are two
different classpaths: (1) the classpath used to load Soot's classes
and run Soot and (2) the classpath that Soot uses to look for classes
it should analyze. The latter is also being referred to as the
sootclasspath.

If you write...

java -cp soot-2.4.0.jar soot.Main -cp janalyzer.jar

... then Soot is on your regular classpath (1) and janalyzer.jar is on
the sootclasspath (2). In this case it should not matter whether or
not janalyzer.jar contains an older version of Soot, since Soot
usually keeps all the classes completely separate.

Hope that helps,
Eric


More information about the Soot-list mailing list