< prev index next >

src/java.base/share/native/libjli/java.c

Print this page

        

*** 1167,1183 **** /* * Passing on splash screen info in environment variables */ if (splash_file_name && !headlessflag) { ! splash_file_entry = JLI_MemAlloc(JLI_StrLen(SPLASH_FILE_ENV_ENTRY "=")+JLI_StrLen(splash_file_name)+1); JLI_StrCpy(splash_file_entry, SPLASH_FILE_ENV_ENTRY "="); JLI_StrCat(splash_file_entry, splash_file_name); putenv(splash_file_entry); } if (splash_jar_name && !headlessflag) { ! splash_jar_entry = JLI_MemAlloc(JLI_StrLen(SPLASH_JAR_ENV_ENTRY "=")+JLI_StrLen(splash_jar_name)+1); JLI_StrCpy(splash_jar_entry, SPLASH_JAR_ENV_ENTRY "="); JLI_StrCat(splash_jar_entry, splash_jar_name); putenv(splash_jar_entry); } --- 1167,1183 ---- /* * Passing on splash screen info in environment variables */ if (splash_file_name && !headlessflag) { ! char* splash_file_entry = JLI_MemAlloc(JLI_StrLen(SPLASH_FILE_ENV_ENTRY "=")+JLI_StrLen(splash_file_name)+1); JLI_StrCpy(splash_file_entry, SPLASH_FILE_ENV_ENTRY "="); JLI_StrCat(splash_file_entry, splash_file_name); putenv(splash_file_entry); } if (splash_jar_name && !headlessflag) { ! char* splash_jar_entry = JLI_MemAlloc(JLI_StrLen(SPLASH_JAR_ENV_ENTRY "=")+JLI_StrLen(splash_jar_name)+1); JLI_StrCpy(splash_jar_entry, SPLASH_JAR_ENV_ENTRY "="); JLI_StrCat(splash_jar_entry, splash_jar_name); putenv(splash_jar_entry); }
*** 2244,2258 **** jboolean isImageScaled = JNI_FALSE; size_t maxScaledImgNameLength = 0; if (file_name == NULL){ return; } - - if (!DoSplashInit()) { - goto exit; - } - maxScaledImgNameLength = DoSplashGetScaledImgNameMaxPstfixLen(file_name); scaled_splash_name = JLI_MemAlloc( maxScaledImgNameLength * sizeof(char)); isImageScaled = DoSplashGetScaledImageName(jar_name, file_name, --- 2244,2253 ----
*** 2269,2285 **** scale_factor = 1; image_data = JLI_JarUnpackFile( jar_name, file_name, &data_size); } if (image_data) { DoSplashSetScaleFactor(scale_factor); DoSplashLoadMemory(image_data, data_size); JLI_MemFree(image_data); - } else { - DoSplashClose(); } } else { if (isImageScaled) { DoSplashSetScaleFactor(scale_factor); DoSplashLoadFile(scaled_splash_name); } else { DoSplashLoadFile(file_name); --- 2264,2280 ---- scale_factor = 1; image_data = JLI_JarUnpackFile( jar_name, file_name, &data_size); } if (image_data) { + DoSplashInit(); DoSplashSetScaleFactor(scale_factor); DoSplashLoadMemory(image_data, data_size); JLI_MemFree(image_data); } } else { + DoSplashInit(); if (isImageScaled) { DoSplashSetScaleFactor(scale_factor); DoSplashLoadFile(scaled_splash_name); } else { DoSplashLoadFile(file_name);
*** 2287,2297 **** } JLI_MemFree(scaled_splash_name); DoSplashSetFileJarName(file_name, jar_name); - exit: /* * Done with all command line processing and potential re-execs so * clean up the environment. */ (void)UnsetEnv(ENV_ENTRY); --- 2282,2291 ----
< prev index next >