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?

Davanum Srinivas

Yes, you can register your native method using RegisterNatives:

const JNINativeMethod methods[] = { 
env->RegisterNatives(env->FindClass("GUITest"), methods, 1);