[WXP]: Help on JNI_CreateJavaVM exported symbol in jvm.dll
    Francis ANDRE 
    francis.andre at easynet.fr
       
    Thu Apr 10 12:06:23 UTC 2008
    
    
  
Hi All
For those interested in, I am building an msvc_2003 solution for the Hotspot JVM 
(compiler2 for now, compiler1 and kernel after) with the includes  from the 
windows-i586-debug directory and using at link time the vm.def generated by the 
make debug_build.
At run time, the java.exe fails to execute because the bin/server/jvm.dll  does 
not export the JNI_CreateJava & JNI_GetDefaultJavaVMInitArgs symbols as expected 
by jdk/src/windows/bin/java_md.c:
jboolean
LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn)
     ...
     ifn->CreateJavaVM =
         (void *)GetProcAddress(handle, "JNI_CreateJavaVM");
     ifn->GetDefaultJavaVMInitArgs =
         (void *)GetProcAddress(handle, "JNI_GetDefaultJavaVMInitArgs");
     if (ifn->CreateJavaVM == 0 || ifn->GetDefaultJavaVMInitArgs == 0) {
         ReportErrorMessage(JNI_ERROR1, (char *)jvmpath);
         return JNI_FALSE;
     }
As the matter of fact, this is correct because the exported symbols are those:
	2372  943 0001F47E _JNI_CreateJavaVM at 12
	2373  944 0002D05B _JNI_GetCreatedJavaVMs at 12
	2374  945 00012382 _JNI_GetDefaultJavaVMInitArgs at 4
while they should be like the one extracted from the build from make:
        1259  4EA 001B0810 JNI_CreateJavaVM
        1260  4EB 001B0930 JNI_GetCreatedJavaVMs
        1261  4EC 001B0770 JNI_GetDefaultJavaVMInitArgs
but I did not find how to export those undecorated symbols instead. How the 
build is producing those symbols??
TIA
FA
PS: BTW, why the solaris and linux get a os/java_md.c and not windows??
    
    
More information about the build-dev
mailing list