[LLVMdev] Using StartJnjvmWithJIT from jnjvm.cpp in VMKit

Gaël Thomas gael.thomas at lip6.fr
Mon Apr 7 01:30:26 PDT 2014


Hi,

Basically, generateMain (JavaAOTCompiler.cpp) generate the C main
function when you compile a Java application with the AOT. And
generateMain invokes the main of the Java application, which is fixed
during the compilation: this main class is simply the main method of
the Main-Class of the jar file (or an argument that you give through
the command line when you invoke the AOT compiler). After, at runtime,
when you invoke the main of the Java application, you have to fill the
arguments of the Java application, and they are given through the
command line. To summarize, the main function looks like this:


int main(int argc, char** argv) {
  StartJnjvmWithJIT(argc, argv, "TheMainClassOfTheCompiledApplication");
}

argc and argv are the arguments given at runtime, the main class is
the argument of the AOT compiler.

Gaël




2014-04-07 0:22 GMT+02:00 Sri <emdcdeveloper at gmail.com>:
> Hi
>       Does anybody use StartJnjvmWithJIT from jvjvm.cpp in VMKit? Becuase ,
> I am looking to use without JIT when we are running the Java byte code. My
> concern is StartJnjvmWithJIT getting three argument int argc, char** argv,
> char* mainClass -  why we need to pass  argv and mainclass arguments here?
>
>
> please help me on this.
>
> Regards
> Sri.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
-------------------------------------------------------------------
Gaël Thomas, Associate Professor, UPMC
http://pagesperso-systeme.lip6.fr/Gael.Thomas/
-------------------------------------------------------------------




More information about the llvm-dev mailing list