src/windows/bin/java_md.c
jboolean
LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn)
{
    HINSTANCE handle;

    JLI_TraceLauncher("JVM path is %s\n", jvmpath);

    /*
     * The Microsoft C Runtime Library needs to be loaded first.  A copy is
     * assumed to be present in the "JRE path" directory.  If it is not found
     * there (or "JRE path" fails to resolve), skip the explicit load and let
     * nature take its course, which is likely to be a failure to execute.
     *
     */
    LoadMSVCRT();

    /* Load the Java VM DLL */
    if ((handle = LoadLibrary(jvmpath)) == 0) {
        JLI_ReportErrorMessage(DLL_ERROR4, (char *)jvmpath);
        return JNI_FALSE;
    }

    /* Now get the function addresses */
    ifn->CreateJavaVM =
        (void *)GetProcAddress(handle, "JNI_CreateJavaVM");
    ifn->GetDefaultJavaVMInitArgs =
        (void *)GetProcAddress(handle, "JNI_GetDefaultJavaVMInitArgs");
    if (ifn->CreateJavaVM == 0 || ifn->GetDefaultJavaVMInitArgs == 0) {
        JLI_ReportErrorMessage(JNI_ERROR1, (char *)jvmpath);
        return JNI_FALSE;
    }

    return JNI_TRUE;
}
/*
 * Load a jvm from "jvmpath" and initialize the invocation functions.
 */
Load a jvm from "jvmpath" and initialize the invocation functions.
Load a jvm from " jvmpath " and initialize the invocation functions .
jboolean
LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn)
{
    HINSTANCE handle;
    JLI_TraceLauncher("JVM path is %s\n", jvmpath);
    LoadMSVCRT();
    if ((handle = LoadLibrary(jvmpath)) == 0) {
        JLI_ReportErrorMessage(DLL_ERROR4, (char *)jvmpath);
        return JNI_FALSE;
    }
    ifn->CreateJavaVM =
        (void *)GetProcAddress(handle, "JNI_CreateJavaVM");
    ifn->GetDefaultJavaVMInitArgs =
        (void *)GetProcAddress(handle, "JNI_GetDefaultJavaVMInitArgs");
    if (ifn->CreateJavaVM == 0 || ifn->GetDefaultJavaVMInitArgs == 0) {
        JLI_ReportErrorMessage(JNI_ERROR1, (char *)jvmpath);
        return JNI_FALSE;
    }
    return JNI_TRUE;
}
jboolean LoadJavaVM ( const char * jvmpath , InvocationFunctions * ifn ) { HINSTANCE handle ; JLI_TraceLauncher ( " \n " , jvmpath ) ; LoadMSVCRT ( ) ; if ( ( handle = LoadLibrary ( jvmpath ) ) == 0 ) { JLI_ReportErrorMessage ( DLL_ERROR4 , ( char * ) jvmpath ) ; return JNI_FALSE ; } ifn -> CreateJavaVM = ( void * ) GetProcAddress ( handle , " " ) ; ifn -> GetDefaultJavaVMInitArgs = ( void * ) GetProcAddress ( handle , " " ) ; if ( ifn -> CreateJavaVM == 0 || ifn -> GetDefaultJavaVMInitArgs == 0 ) { JLI_ReportErrorMessage ( JNI_ERROR1 , ( char * ) jvmpath ) ; return JNI_FALSE ; } return JNI_TRUE ; }
Load a jvm from "jvmpath" and initialize the invocation functions.
Load a jvm from " jvmpath " and initialize the invocation functions .
/*
     * The Microsoft C Runtime Library needs to be loaded first.  A copy is
     * assumed to be present in the "JRE path" directory.  If it is not found
     * there (or "JRE path" fails to resolve), skip the explicit load and let
     * nature take its course, which is likely to be a failure to execute.
     *
     */ /* Load the Java VM DLL */ /* Now get the function addresses */