[Soot-list] Beginner's question: Making
tutorial/guide/examples/call_graph example work
Michal Young
michal at cs.uoregon.edu
Thu Jan 3 20:15:03 EST 2008
I am new to Soot, and trying to use the examples distributed with the
tutorial as a gentle introduction to the API (along with the supplied
documentation, of course). Unfortunately I seem to be doing
something very basic wrong, because the provided example tutorial/
guide/examples/call_graph is not working for me --- the classfile
java.lang.Object is not being found even though it is on $CLASSPATH.
My environment:
java soot.Main says: Soot version 2.2.3
'uname -a' says: SunOS ix 5.9 Generic_118558-38 sun4u sparc
SUNW,Sun-Fire-280R
java -version says: Java(TM) 2 Runtime Environment, Standard
Edition (build 1.4.0_00-b05)
Java HotSpot(TM) Client VM
(build 1.4.0_00-b05, mixed mode)
CLASSPATH includes soot/classes, polyglot-1.3.4/classes,
jasmin-2708/classes and the accompanying
cup-classes, and (most relevant, I think) /usr/java/jre/lib/rt.jar
The classfile java.lang.Object does seem to be on the classpath:
bash-2.05$ jar tf /usr/java/jre/lib/rt.jar | egrep "lang/Object"
java/lang/Object.class
soot.Main run from the command line does seem to be able to build and
use a call graph.
And yet ... when I try to run the example from the tutorial guide ...
bash-2.05$ java dk.brics.soot.callgraphs.CallGraphExample
Exception in thread "main" java.lang.RuntimeException:
Aborting: can't find classfile java.lang.Object
at soot.Scene.getSootClass(Scene.java:381)
at soot.javaToJimple.ClassResolver.createClassDecl
(ClassResolver.java:86)
at soot.javaToJimple.ClassResolver.createSource
(ClassResolver.java:751)
at soot.javaToJimple.InitialResolver.resolveFromJavaFile
(InitialResolver.java:179)
at soot.JavaClassSource.resolve(JavaClassSource.java:49)
at soot.SootResolver.bringToHierarchy(SootResolver.java:148)
at soot.SootResolver.bringToSignatures(SootResolver.java:172)
at soot.SootResolver.bringToBodies(SootResolver.java:214)
at soot.SootResolver.processResolveWorklist
(SootResolver.java:100)
at soot.SootResolver.resolveClass(SootResolver.java:89)
at soot.Scene.loadClass(Scene.java:336)
at soot.Scene.loadClassAndSupport(Scene.java:321)
at dk.brics.soot.callgraphs.CallGraphExample.main
(CallGraphExample.java:18)
Hints?
Thanks,
--Michal
More information about the Soot-list
mailing list