The third argument of the method JNI_CreateJavaVM takes the third argument as JavaVMInitArgs structure.
typedef struct JavaVMInitArgs {
jint version;
jint nOptions;
JavaVMOption *options;
jboolean ignoreUnrecognized;
} JavaVMInitArgs;
How do i initialize this ? I am unable to do so.
Prototype of JNI_CreateJavaVM: jint JNI_CreateJavaVM(JavaVM **pvm, void **penv,
void *vm_args);
How do i initialize vm_args ?
After some discussion we came to the conclution that you had problems with your compiler setup.
To be able to successfully compile and link
JNI_CreateJavaVMyou need to add thejvmlibrary to your linker.Initial answer:
Looking at The Invocation API the following example might explain what you need to do: