[Soot-list] Problems While Trying to Generate CFG on Windows 7

Ekincan Ufuktepe ekincanufuktepe at gmail.com
Fri Jul 14 09:08:35 EDT 2017


Hi,

I have been trying to generate a CFG (control-flow graph) by using Soot.
First I tried to run Soot on command-line and I have been following the
instruction on the link.

Here are a couple of trials I have made and the errors I have received.

1)
Command: java -cp soot-2.5.0.jar soot.Main -cp . -process-dir
..\....\myJavaProject

Error: Exception in thread "main" java.lang.RuntimeException: couldn't find
class: xxx.yyy.zzz.MyClass (is your soot-class-path set properly?)

"xxx.yyy.zzz.MyClass" is one of the package and class information that is
in "myJavaProject"

2)
Command: Command: java -cp soot-2.5.0.jar soot.Main -cp . -pp -process-dir
..\....\myJavaProject

Error: Exception in thread "main" java.lang.RuntimeException: couldn't load
classfile: java.io.ObjectInputStream

=============================================

However, when I try to process a single .java file within the same
directory with soot-2.5.0.jar I get a different error.

3)
Command: java -cp soot-2.5.0.jar soot.Main -cp . MyClass

Error: Exception in thread "main" java.lang.Error: Error loading
java.util.regex.Pattern

So tried to use by giving rt.jar's path.

4) Command: java -cp soot-2.5.0.jar soot.Main -cp .
..\...\Java\jre1.8.0_111\lib\rt.jar MyClass

Error: Exception in thread "main" java.lang.RuntimeException: couldn't find
class: ..\...\Java\jre1.8.0_111\lib\rt.jar (is your soot-class-path set
properly?)

Or another option

5) Command: java -cp soot-2.5.0.jar soot.Main -cp . -pp MyClass

Error: Exception in thread "main" java.lang.RuntimeException: couldn't load
classfile: java.io.ObjectInputStream

I wanted to generate a CFG by using the "dump-cfg", but it seems that I got
stuck with the basics. I would really appreciate any with to generate a CFG
of a Java project.

Or rather than running Soot on command-line, is it possible to generate a
CFG by using soot-2.5.0.jar as a library. If yes, could you please show me
how to do it?

Thanks in advance.

Ekin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20170714/ca671a9a/attachment.html>


More information about the Soot-list mailing list