I have a C++ program which invokes an instance of the JVM. I would like that instance of the JVM to make a call to a native method in the C++ program that performed the invocation. Is there some way to get this to work without having to put the native method into a separate DLL?
Created May 4, 2012
Davanum Srinivas Yes, you can register your native method using RegisterNatives:
const JNINativeMethod methods[] = { { "test", "()V", &Java_GUITest_test } }; env->RegisterNatives(env->FindClass("GUITest"), methods, 1);