[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Analyzing .jar file



Hi Alex,

On Mon, 28 May 2001, Warshavsky Alex wrote:

> Given a XXX.jar file I need to analyze (perform transformations on) all classes it contains.
> One way would be to unjar the .jar file and give as an input to Soot all classes that it contains (if
> the .jar file contains many class files it wouldn't be easy).

That's a bit painful, yes.

> The second solution would be to find the "main" class in the .jar file and
> use the --app option (the problem with that solution is that I may analyze more class files that
> I have expected to analyze (for example if one of the classes in the .jar uses Soot I will analyze
> all Soot files !)).

This would probably be easier.  If you want to exclude all soot files, you
can do that by package.  If I recall correctly, you use -x java.lang to
exclude all classes in the java.lang package from analysis.

A third solution is to unjar, write out all of the class names and handle
them with perl or other file tools to get a long Soot commandline, and run
that.

pat