[LLVMdev] Using StartJnjvmWithJIT from jnjvm.cpp in VMKit

Sri emdcdeveloper at gmail.com
Mon Apr 7 12:53:42 PDT 2014


Hi Gael
           Thank you for your clarification. I have generated .bc from 
vmjc by giving java byte code ,  now generated .bc having 
StartJnjvmWithoutJIT function. So , I write a simple application as you 
mentioned and passed the mainclass as "HelloWorld" and argv is nothing 
since my java program not taking any arguments. I am getting following error
*j3: JavaRuntimeJIT.cpp:381: void *j3ResolveVirtualStub(j3::JavaObject 
*): Assertion `FI->Metadata != __null && "Wrong stack trace"' failed.**
**Aborted (core dumped)*
Am I missing anything here.

Thanks

Regards
Sri.

On 04/07/2014 09:30 AM, Gaël Thomas wrote:
> 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
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140407/6380eed2/attachment.html>


More information about the llvm-dev mailing list