src/java.base/macosx/native/libjli/java_md_macosx.c

Print this page

        

*** 946,957 **** NULL_CHECK(classClass = FindBootStrapClass(env, "java/lang/Class")); jmethodID getCanonicalNameMID = NULL; NULL_CHECK(getCanonicalNameMID = (*env)->GetMethodID(env, classClass, "getCanonicalName", "()Ljava/lang/String;")); ! jstring mainClassString = NULL; ! NULL_CHECK(mainClassString = (*env)->CallObjectMethod(env, mainClass, getCanonicalNameMID)); const char *mainClassName = NULL; NULL_CHECK(mainClassName = (*env)->GetStringUTFChars(env, mainClassString, NULL)); char envVar[80]; --- 946,964 ---- NULL_CHECK(classClass = FindBootStrapClass(env, "java/lang/Class")); jmethodID getCanonicalNameMID = NULL; NULL_CHECK(getCanonicalNameMID = (*env)->GetMethodID(env, classClass, "getCanonicalName", "()Ljava/lang/String;")); ! jstring mainClassString = (*env)->CallObjectMethod(env, mainClass, getCanonicalNameMID); ! if ((*env)->ExceptionCheck(env)) { ! /* ! * Clears all errors caused by getCanonicalName() on the mainclass and ! * leaves the JAVA_MAIN_CLASS__<pid> empty. ! */ ! (*env)->ExceptionClear(env); ! return; ! } const char *mainClassName = NULL; NULL_CHECK(mainClassName = (*env)->GetStringUTFChars(env, mainClassString, NULL)); char envVar[80];
*** 1054,1064 **** /* * Note the jvmInstance must be initialized first before entering into * ShowSplashScreen, as there is a callback into the JLI_GetJavaVMInstance. */ ! void PostJVMInit(JNIEnv *env, jstring mainClass, JavaVM *vm) { jvmInstance = vm; SetMainClassForAWT(env, mainClass); CHECK_EXCEPTION_RETURN(); ShowSplashScreen(); } --- 1061,1071 ---- /* * Note the jvmInstance must be initialized first before entering into * ShowSplashScreen, as there is a callback into the JLI_GetJavaVMInstance. */ ! void PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm) { jvmInstance = vm; SetMainClassForAWT(env, mainClass); CHECK_EXCEPTION_RETURN(); ShowSplashScreen(); }