Skip to content

Commit 068f4ce

Browse files
committed
8343293: Remove the check for <apphome>/jre/lib/libjava.dylib from the launcher's java_md_macosx.m
Reviewed-by: bpb, rriggs
1 parent f621f26 commit 068f4ce

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

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

+2-12
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ static void MacOSXStartup(int argc, char *argv[]) {
415415
{
416416
char libjava[MAXPATHLEN];
417417

418+
JLI_TraceLauncher("Attempt to get JDK installation root from launcher executable path\n");
419+
418420
if (GetApplicationHome(path, pathsize)) {
419421
/* Is the JDK co-located with the application? */
420422
if (JLI_IsStaticallyLinked()) {
@@ -429,18 +431,6 @@ static void MacOSXStartup(int argc, char *argv[]) {
429431
return JNI_TRUE;
430432
}
431433
}
432-
/* ensure storage for path + /jre + NULL */
433-
if ((JLI_StrLen(path) + 4 + 1) > (size_t) pathsize) {
434-
JLI_TraceLauncher("Insufficient space to store JRE path\n");
435-
return JNI_FALSE;
436-
}
437-
/* Does the app ship a private JRE in <apphome>/jre directory? */
438-
JLI_Snprintf(libjava, sizeof(libjava), "%s/jre/lib/" JAVA_DLL, path);
439-
if (access(libjava, F_OK) == 0) {
440-
JLI_StrCat(path, "/jre");
441-
JLI_TraceLauncher("JRE path is %s\n", path);
442-
return JNI_TRUE;
443-
}
444434
}
445435

446436
/* try to find ourselves instead */

0 commit comments

Comments
 (0)