Skip to main content

How do I access the JNI Invocation API in MR1?

1 reply [Last post]
Joined: 2007-07-10

Hi everybody,

I want to use the JNI Invocation API (which includes functions like JNI_CreateJavaVM). What do I have to link my program against?

I just downloaded the MR1 source and compiled it by calling "make" in build/linux-x86-generic and successfully created a cvm file. So nothing fancy yet. But, I also expected some kind of library to appear that I could link my C++ program against.

Hope you can help,

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-10-16

We intend to someday provide a cvm.o you can link against, but for now you'll need to take a different route. One choice is to compile your application into a bunch of .o files first, and change the command that links cvm to include your .o files, and also make it use your main() rather than the one in java_md.c, which you'll need to replace. The other choice is to link your applicatin with all the .o and .a files in the obj directory that is created during the cvm build. Once again you would replace java_md.o with your own main.

good luck,