[Soot-list] Java static analysis with eclipse (Urgent)

Denis Bogdanas denis.bogdanas at gmail.com
Fri Sep 23 15:04:18 EDT 2016


Oh, forget about that. The examples were all about command-line. Had
difficulties with eclipse plugin myself and gave up.


On 23 September 2016 at 12:03, Denis Bogdanas <denis.bogdanas at gmail.com>
wrote:

> Hello,
> There are some examples on how to do that in Soot survivor's guide.
>
>
> On 22 September 2016 at 15:10, hesam ghafouri <hsmghfr at yahoo.com> wrote:
>
>> Hello all,
>>
>> 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.
>> What should I add in eclipse arguments?? Please help me if some one knows
>> about that, its very urgent. Thank you in advance
>>
>>
>> Here is my code: (the only thing I want to know is how to load the sample
>> class, I know the rest analysis)
>>
>>     public static void main(String[] args) {
>>         // TODO Auto-generated method stub
>>
>>         Options.v().set_keep_line_number(true);
>>
>>         Options.v().set_whole_program(true);
>>
>>         Options.v().set_allow_phantom_refs(true);
>>
>>         Options.v().set_src_prec(Options.src_prec_java);
>>
>>         Options.v().set_output_format(Options.output_format_jimple);
>>
>>         Options.v().setPhaseOption("cg.cha", "on");
>>
>>         SootClass sootClass = Scene.v().loadClassAndSupport("sample");
>> //I copied the sample.java file in project src directory
>>         sootClass.setApplicationClass();
>>
>>         for(SootMethod method : sootClass.getMethods())
>>         {
>>                 //analyze codes
>>         }
>>
>>         soot.Main.main(args);
>>     }
>>
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at CS.McGill.CA
>> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>>
>>
>
>
> --
> Denis
>



-- 
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20160923/7484294f/attachment.html 


More information about the Soot-list mailing list