static jclass GetLiveConnectProxy(JNIEnv* env, nsICodebasePrincipal* codebasePrincipal)
static jclass GetLiveConnectProxy(JNIEnv* env, nsIPrincipal* codebasePrincipal)
static jclass GetLiveConnectProxy(JNIEnv* env, nsICodebasePrincipal* codebasePrincipal){    jclass liveConnectProxy = NULL;    jclass netscape_oji_ProxyClassLoaderFactory = env->FindClass("netscape/oji/ProxyClassLoaderFactory");    if (netscape_oji_ProxyClassLoaderFactory) {        jmethodID createClassLoaderID = env->GetStaticMethodID(netscape_oji_ProxyClassLoaderFactory,                                                               "createClassLoader",                                                                "(Ljava/lang/String;)Ljava/lang/ClassLoader;");        if (createClassLoaderID) {            jstring codebaseUTF = NULL;            char* codebase;            nsresult rv = codebasePrincipal->GetOrigin(&codebase);            if (NS_SUCCEEDED(rv)) {                codebaseUTF = env->NewStringUTF(codebase);                delete[] codebase;            }            if (codebaseUTF) {                jobject classLoader = env->CallStaticObjectMethod(netscape_oji_ProxyClassLoaderFactory,                                                                  createClassLoaderID, codebaseUTF);                if (classLoader) {                    jclass clazz = env->GetObjectClass(classLoader);                    jmethodID loadClassID = env->GetMethodID(clazz, "loadClass",                                                             "(Ljava/lang/String;)Ljava/lang/Class;");                    if (loadClassID) {                        jstring className = env->NewStringUTF("netscape.oji.LiveConnectProxy");                        if (className) {                            liveConnectProxy = (jclass) env->CallObjectMethod(classLoader, loadClassID, className);                            env->DeleteLocalRef(className);                        }                    }                    env->DeleteLocalRef(clazz);                }                env->DeleteLocalRef(codebaseUTF);            }        }        env->DeleteLocalRef(netscape_oji_ProxyClassLoaderFactory);    }    check_exceptions(env);    return liveConnectProxy;}