Closed ctrueden closed 5 years ago
The splash screen on OS X is hard coded to /System/Library/Java/JavaVirtualMachines. This is wrong—it should look for libsplashscreen.dylib (or libsplashscreen.jnilib in older cases) in the chosen JRE's lib folder; e.g.:
/System/Library/Java/JavaVirtualMachines
libsplashscreen.dylib
libsplashscreen.jnilib
lib
$ find /Library/Java/JavaVirtualMachines -name 'libsplashscreen.*' /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/libsplashscreen.jnilib /Library/Java/JavaVirtualMachines/1.6.0_45-b06-451.jdk/Contents/Libraries/libsplashscreen.jnilib /Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Libraries/libsplashscreen.jnilib /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre/lib/libsplashscreen.dylib /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/libsplashscreen.dylib /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/libsplashscreen.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/libsplashscreen.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre/lib/libsplashscreen.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/libsplashscreen.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/lib/libsplashscreen.dylib
The relevant logic in the source is:
diff --git a/src/main/c/splash.c b/src/main/c/splash.c index 3e7d587..427dc9e 100644 --- a/src/main/c/splash.c +++ b/src/main/c/splash.c @@ -51,8 +51,12 @@ struct string *get_splashscreen_lib_path(const char *jre_home) struct string *search_root = string_initf("/System/Library/Java/JavaVirtualMachines"); struct string *result = string_init(32); if (!find_file(search_root, 4, "libsplashscreen.jnilib", result)) { - string_release(result); - result = NULL; + string_release(search_root); + search_root = string_initf("/Library/Java/JavaVirtualMachines"); + if (!find_file(search_root, 4, "libsplashscreen.dylib", result)) { + string_release(result); + result = NULL; + } } string_release(search_root); return result;
Although of course, the patch above is still woefully insufficient.
Attempted to fix on the apple-splash-screen branch, but it does not work.
The splash screen on OS X is hard coded to
/System/Library/Java/JavaVirtualMachines
. This is wrong—it should look forlibsplashscreen.dylib
(orlibsplashscreen.jnilib
in older cases) in the chosen JRE'slib
folder; e.g.:The relevant logic in the source is:
Although of course, the patch above is still woefully insufficient.