<html><head></head><body><div style="color:#000; background-color:#fff; font-family:bookman old style, new york, times, serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1474581462417_6256">Hello all,</div><div id="yui_3_16_0_ym19_1_1474581462417_6257"><div id="yui_3_16_0_ym19_1_1474581462417_6293"><br id="yui_3_16_0_ym19_1_1474581462417_6258"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1474581462417_6268">It is very urgent. I searched a lot to find out how to load a java class to analyze using eclipse but I really couldn't find any solution. I want to do some static analyze on a java file (/Desktop/sampleFolder/sample.java). I think I need to add this file (or its path) into my soot-class path, how can I do that in eclipse??? I know how to do it in command line. <br></div><div id="yui_3_16_0_ym19_1_1474581462417_6514" dir="ltr">What should I add in eclipse arguments?? Please help me if some one knows about that, its very urgent. Thank you in advance <br></div><div id="yui_3_16_0_ym19_1_1474581462417_6516" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1474581462417_6517" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1474581462417_6577" dir="ltr">Here is my code: (the only thing I want to know is how to load the sample class, I know the rest analysis)<br></div><div id="yui_3_16_0_ym19_1_1474581462417_6492" dir="ltr"><br></div>&nbsp;&nbsp;&nbsp; public static void main(String[] args) {<br id="yui_3_16_0_ym19_1_1474581462417_6457">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // TODO Auto-generated method stub<br id="yui_3_16_0_ym19_1_1474581462417_6458">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br id="yui_3_16_0_ym19_1_1474581462417_6459">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Options.v().set_keep_line_number(true);<br id="yui_3_16_0_ym19_1_1474581462417_6460"><br id="yui_3_16_0_ym19_1_1474581462417_6461">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Options.v().set_whole_program(true);<br id="yui_3_16_0_ym19_1_1474581462417_6462"><br id="yui_3_16_0_ym19_1_1474581462417_6463">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Options.v().set_allow_phantom_refs(true);<br id="yui_3_16_0_ym19_1_1474581462417_6464">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br id="yui_3_16_0_ym19_1_1474581462417_6465">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Options.v().set_src_prec(Options.src_prec_java);<br id="yui_3_16_0_ym19_1_1474581462417_6466">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br id="yui_3_16_0_ym19_1_1474581462417_6467">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Options.v().set_output_format(Options.output_format_jimple);<br id="yui_3_16_0_ym19_1_1474581462417_6468"><br id="yui_3_16_0_ym19_1_1474581462417_6469">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Options.v().setPhaseOption("cg.cha", "on");<br id="yui_3_16_0_ym19_1_1474581462417_6470">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br id="yui_3_16_0_ym19_1_1474581462417_6472"><div id="yui_3_16_0_ym19_1_1474581462417_6639" dir="ltr">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SootClass sootClass = Scene.v().loadClassAndSupport("sample");&nbsp; //I copied the sample.java file in project src directory<br></div>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sootClass.setApplicationClass();<br id="yui_3_16_0_ym19_1_1474581462417_6474"><br id="yui_3_16_0_ym19_1_1474581462417_6475">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for(SootMethod method : sootClass.getMethods())<br id="yui_3_16_0_ym19_1_1474581462417_6476">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br id="yui_3_16_0_ym19_1_1474581462417_6477">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //analyze codes<br id="yui_3_16_0_ym19_1_1474581462417_6478">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br id="yui_3_16_0_ym19_1_1474581462417_6479">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br id="yui_3_16_0_ym19_1_1474581462417_6480">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; soot.Main.main(args);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br id="yui_3_16_0_ym19_1_1474581462417_6482"><div id="yui_3_16_0_ym19_1_1474581462417_6500" dir="ltr">&nbsp;&nbsp;&nbsp; }</div></div></div></body></html>