[Soot-list] Soot and Java class path

Steven Arzt Steven.Arzt at cased.de
Wed Jun 3 04:27:47 EDT 2015


Hi Naveen, 

 

Soot only prepends the Java classpath to the Soot classpath if you
explicitly specify the -pp or -prepend-classpath option. This is important
since you sometimes don't want the JDK on the Soot classpath. If you are,
for instance, analyzing Android applications, this could lead to wrong
results as Android uses its own framework which is slightly different from
the JDK. Another use case would be to run Soot with one Java version, but
analyze a Java program together with a different target JDK.

 

Best regards,

  Steven

 

Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA]
Im Auftrag von Naveen Neelakandan
Gesendet: Mittwoch, 3. Juni 2015 10:02
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] Soot and Java class path

 

Hello,

 

I am working on writing an application that extends soot and I came across
some inconsistent behaviour. In the 2.5.0 version of Soot, all classes on
the Java classpath are also on the Soot classpath. However, for the nightly
build (as of today - 6/3/15), this is not the case and only those classes
explicitly specified with the -cp flag on the command line to the Soot Main
are on the Soot classpath.

 

Thus, for example, if the following command was run, then for Soot-2.5.0,
soot.package.TesterClass would be listed as an application class in
scene.getApplicationClasses(). Whereas, in the Soot-nightly, there would be
a ClassNotFound Exception. Assuming soot.package.TesterClass is present in
Tester.jar only.

 

java -cp Tester.jar soot.SootMain -cp some-dir soot.package.TesterClass
[other options]

 

This seems to be similar to the issue rockflying describes here:
https://github.com/Sable/soot/issues/284

 

Should I open up a new issue for this or is this the expected behaviour?

 

Thanks,


 <https://github.com/Sable/soot/issues/284> 

soot.SootResolver$SootClassNotFoundException when ... . Issue #284 .
Sable/soot . GitHub

Steps to reproduce: 1.) This is my command line: java -cp soot-trunk.jar
soot.Main -cp
/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre/lib/rt.j
ar:"../benchmarks/Sunflow/sunflow/classes/":"../benchmarks/Sunflow/sunflow..
.

 <https://github.com/Sable/soot/issues/284> Read more...

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150603/b7d8a5ef/attachment.html 


More information about the Soot-list mailing list