<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
<div dir="ltr"><br>
Hello I am new to soot.I tried run simple example.my class name is my class and my name of jar file is my class my name of method is printone, first i put my file in clasdphath, then i put myclass in loadand support and myname of method in getmethod byname,
but i get errors.</div>
<div dir="ltr">
<pre style="box-sizing: inherit; margin-top: 0px; margin-bottom: 0.8em; padding: 10px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace; font-stretch: inherit; line-height: inherit; font-size: 13px; vertical-align: baseline; word-wrap: normal; background-color: rgb(240, 240, 240); max-height: 300px; overflow: auto; caret-color: rgb(12, 13, 14); color: rgb(12, 13, 14); -webkit-text-size-adjust: 100%;"><code style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; max-height: 300px; overflow: auto;"><br></code></pre>
<pre style="box-sizing: inherit; margin-top: 0px; margin-bottom: 0.8em; padding: 10px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace; font-stretch: inherit; line-height: inherit; font-size: 13px; vertical-align: baseline; word-wrap: normal; background-color: rgb(240, 240, 240); max-height: 300px; overflow: auto; caret-color: rgb(12, 13, 14); color: rgb(12, 13, 14); -webkit-text-size-adjust: 100%;"><code style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace; font-style: inherit; font-variant-caps: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; max-height: 300px; overflow: auto;">private static final Body B = null;
public static void main(String[] args) {
// TODO Auto-generated method stub
final String apppath = "c:\\Users\\SHTAV3\\Desktop\\Myclass.jar";
soot.G.reset();
Options.v().set_process_dir(Collections.singletonList(apppath));
Options.v().set_allow_phantom_refs(true);
Options.v().set_prepend_classpath(true);
Options.v().set_validate(true);
Options.v().set_whole_program(true);
Options.v().set_app(true);
Options.v().set_src_prec(Options.src_prec_class);
Scene.v().loadNecessaryClasses();
SootClass appclass = Scene.v().loadClassAndSupport("Myclass");
appclass.setApplicationClass();
SootMethod m = appclass.getMethodByName("printOne");
ExceptionalUnitGraph g = new ExceptionalUnitGraph(B);
Body B = m.retrieveActiveBody();
VeryBusyExpressions an = new VeryBusyExpressions();
Iterator i = g.iterator();
while (i.hasNext()) {
Unit u = (Unit)i.next();
List IN = an.getBusyExpressionsBefore(u);
List OUT = an.getBusyExpressionsAfter(u);
}
PackManager.v().runPacks();
CallGraph cg = Scene.v().getCallGraph();
System.out.println(cg.toString());
</code></pre>
<br class="Apple-interchange-newline" style="-webkit-text-size-adjust: auto;">
<div><br>
<div dir="ltr">Sent from my iPhone</div>
</div>
</div>
</body>
</html>