From talking with my friends at SAS and from poking around in the code
I believe I have found a problem in CJavaJNI.cpp.
The routine:
jint CJavaJNI::JNI_GetCreatedJavaVMs(JavaVM **vmp, jsize bufLen ,jsize *nVMS) {
JVM_GETCREATED proc;
proc =(JVM_GETCREATED) GetProcAddress(m_hMod, "JNI_GetCreatedJavaVMs");
return proc != 0 ? (*proc)(vmp, bufLen, nVMS) : -1;
}
uses the variable `m_hMod', which is not set (it is an auto variable).
So, my idea is to set `m_hMod' in `LoadJavaVM'.
If you start the JVM from jpishare.dll you will not see this
problem. This might explain why we have gone so far without running
into this yet.