[Soot-list] Soot exception: There is no main class set!
Marc-Andre Laverdiere-Papineau
marc-andre.laverdiere-papineau at polymtl.ca
Fri Jun 22 17:14:16 EDT 2012
Hello Harsha,
I have read that thread in diagonals, so I was under the impression that
you had gotten an answer already. Ooops :S
One option you have is to trace all the execution, which is probably not
gonna be fun. But it may help fix a bug.
Another option is for you to find your main manually. It is not a lot of
code to traverse all the loaded classes for your main.
Scene.v().loadNecessaryClasses();
Scene.v().loadBasicClasses();
//Set entry points
List<SootMethod> entryPoints = new ArrayList<SootMethod>();
for (SootClass sc : Scene.v().getClasses()){
if (sc.declaresMethodByName("main"))
entryPoints.add(sc.getMethodByName("main"));
}
Scene.v().setEntryPoints(entryPoints);
You should be set at that point.
--
Marc-André Laverdière-Papineau
Étudiant au doctorat - PhD Student
On 06/22/2012 04:26 PM, Harsha vardhan Rajendran wrote:> Oh! RIght..
That does make sense. So, I tried a few other things like:
>
> java -Xmx2048m -cp
>
../build/jar/bianlian.jar:../code/lib/polyglotclasses-1.3.5.jar:../code/lib/jasminclasses-nightly.jar:../code/lib/log4j-1.2.15.jar:../code/lib/sootclasses-nightly.jar
> server.blockify.Blockifier add.ClassAdd -main-class add.ClassAdd
>
> So, according to the documentation of this project Blockifier takes
> another class as input to process. SO, I have given it one (ClassAdd).
> So, in essence ClassAdd should be converted to its equivalent Jimple
> form and then be passed to Blockifer. I have sent you Blockifier class
> in the previous mail, so this is coded in there.
>
> Isn't this being achieved in the above command? I still get this error:
>
> *Exception in thread "main" java.lang.RuntimeException: Main-class has
> no main method!*
>
> But the main class I specified DOES have a main method....
>
> Thanks
> Harsha
>
><SNIP>
More information about the Soot-list
mailing list