[Soot-list] one question about "No main class given.Inferred 'helloworld2' as main class."

jiangfan shi jiangfan.shi at gmail.com
Wed Aug 13 09:33:00 EDT 2008


Thanks, Eric. The problem is solved by the new option list

"-w  -main-class helloworld --app helloworld ".

Jiangfan

On Wed, Aug 13, 2008 at 8:24 AM, Eric Bodden <eric.bodden at mail.mcgill.ca> wrote:
> In whole-program mode Soot needs to know which class is the main class
> supposed to run your "whole program". If you don't give a class name
> with the -main-class option, it simply takes the first it can find and
> tells you about it.
>
> Eric
>
> 2008/8/13 jiangfan shi <jiangfan.shi at gmail.com>:
>> Hello,
>>
>> When I apply my transformer to my application classes, helloworld.java
>> and helloworld2.java, I encountered an warning "No main class
>> given.Inferred 'helloworld2' as main class."
>>
>> My options for soot is following:
>>
>> java soot.Main --app -w helloworld
>>
>> ==============the following is helloworld.java==============
>>
>> public class helloworld {
>>        public static void main(String[] args) {
>>                System.out.println("hello world");
>>                helloworld2 tmp2=new helloworld2();
>>                tmp2.processOctetMsg();
>>        }
>>
>>        void open1() {
>>        }
>>
>>         void processOctetMsg(){
>>                 System.out.println("processing in h1");
>>                 helloworld2 tmp2=new helloworld2();
>>                        tmp2.open2();
>>        }
>> }
>> ====================The following is helloworld2.java======================
>>
>>
>> public class helloworld2 {
>>        public static void main(String[] args) {
>>                System.out.println("hello world");
>>                helloworld tmp=new helloworld();
>>                tmp.processOctetMsg();
>>        }
>>
>>        void open2(){
>>        }
>>
>>        void processOctetMsg(){
>>                System.out.println("processing in h2");
>>                helloworld tmp=new helloworld();
>>                tmp.open1();
>>        }
>> }
>>
>>
>> Any hints about the soot warning?
>>
>> Thanks in advance, and I appreciate your answers.
>>
>> Jiangfan
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>
>
>
> --
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
>


More information about the Soot-list mailing list