[Soot-list] How to set -process-dir and -cp correctly in this case? I got the error: class small.DataClass read in from a classfile in which DataClass was expected.

Khanh Nguyen khanhtn1 at uci.edu
Mon Nov 18 02:47:14 EST 2013


Hello,

I know that this question has been in the list since a long time ago, I
read all those posts and got what I wanted to do but still, I want it work
in another way (if possible)
The background is this: In C:\test\bin I have 2 folders, "simple" and
"small" (equivalent to 2 different packages) in "small", I have one class:
DataClass.class, in "simple", I also have one class called DataClass.class

I want to apply my analysis only on folder "small". Thus I used the command
line :-process-dir C:\test\bin\small -cp C:\test\bin\small.
I understand that by setting -process-dir C:\test\bin\small, the class Soot
will find to load is DataClass.class (i.e. no info about the package
'small') which is okay, that's why I thought the -cp must be set as
C:\test\bin\small. So now the file structure is identical. But I got the
error instead("class small.DataClass read in from a classfile in which
DataClass was expected.")
Is it because even when setting -cp: C:\test\bin\small the class loaded is
still be considered as small.DataClass? (because the actual class is read
and thus, the name is small.DataClass?)


Of course I can make my analysis to work only on "small" by deleting the
"simple" and set both -process-dir and -cp to C:\test\bin (so that
-process-dir sets the target class is actually small.DataClass and -cp will
let me see small\DataClass.class)
But, even with only "small" under C:\test\bin, I cant do -process-dir
C:\test\bin -cp C:\test\bin\small, either (Soot will complain there is no
small.DataClass on classpath- why? now -cp only see DataClass.class?)

But, bottom line is, isnt there anyway to just set the target of the
analysis restricted to only 1 package like what I wanted?

Thank you,

Khanh Nguyen
UC Irvine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20131117/5ceeb7a9/attachment.html 


More information about the Soot-list mailing list