[Soot-list] Load class from jar

Eric Bodden eric.bodden at mail.mcgill.ca
Tue Jul 22 10:46:28 EDT 2008


There are two different classpaths: (1) the classpath that Soot uses
to run, which you set with your JVM's -cp parameter, and (2) Soot's
classpath, which it uses to analyze programs, and which you set using
*Soot's* -cp parameter. It seems like you have to put your
sootclasses.jar on the latter.

Eric

2008/7/22 Silviu ANDRICA <silviu.andrica at epfl.ch>:
> Hello,
>   again, many thanks. I seem to run into some trouble when I try to play
> with classes that use soot.
> I get the following error:
>   java.lang.RuntimeException: couldn't find class: soot.Value (is your
> soot-class-path set properly?)
>   at soot.SootResolver.bringToHierarchy(SootResolver.java:174)
>   at soot.SootResolver.bringToSignatures(SootResolver.java:209)
>   at soot.SootResolver.processResolveWorklist(SootResolver.java:139)
>   at soot.SootResolver.resolveClass(SootResolver.java:124)
>   at soot.Scene.loadClass(Scene.java:390)
>   at BytecodeToJimple.run(BytecodeToJimple.java:146)
>   at BytecodeToJimple.main(BytecodeToJimple.java:112)
>
> Best regards,
>   Silviu
> Martin Bravenboer wrote:
>>
>> Hi,
>>
>> I wrote a small standalone tool that loads class files only from the
>> jar/zip and .class files specified at the command-line. It's a tool
>> for converting bytecode to Jimple. The nice thing about this is that
>> the tool never accidentally loads class files from a location you
>> don't expect: everything is explicit. If you want to write your own
>> Soot main program and tweak the way classes are loaded, then this
>> might be a useful example.
>>
>> The SVN location of the package:
>> https://svn.strategoxt.org/repos/mbravenboer-public/soot-tools/trunk/
>>
>> The Soot ClassProvider implementation:
>>
>> https://svn.strategoxt.org/repos/mbravenboer-public/soot-tools/trunk/name/bravenboer/martin/soot/NoSearchingClassProvider.java
>>
>> There is a small README  in the trunk that explains how to use the tool.
>>
>> Hope this helps,
>> --
>> Martin Bravenboer
>> ---------------------------------------------------------------------
>> Department of Computer and Information Science
>> University of Oregon
>>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list