Mercurial > hg > graal-jvmci-8
diff src/os/posix/launcher/java_md.c @ 4846:e8a4934564b2
7125793: MAC: test_gamma should always work
Summary: Fix gamma launcher on Mac OS X and reconcile test_gamma script on Unix platforms
Reviewed-by: dcubed, ohair, jcoomes, dholmes, ksrini
Contributed-by: james.melvin@oracle.com
author | phh |
---|---|
date | Tue, 24 Jan 2012 19:33:14 -0500 |
parents | f08d439fab8c |
children | b9a9ed0f8eeb |
line wrap: on
line diff
--- a/src/os/posix/launcher/java_md.c Tue Jan 24 14:07:03 2012 -0500 +++ b/src/os/posix/launcher/java_md.c Tue Jan 24 19:33:14 2012 -0500 @@ -701,6 +701,14 @@ char libjava[MAXPATHLEN]; if (GetApplicationHome(path, pathsize)) { + + /* Is the JRE universal, i.e. no arch dir? */ + sprintf(libjava, "%s/jre/lib/" JAVA_DLL, path); + if (access(libjava, F_OK) == 0) { + strcat(path, "/jre"); + goto found; + } + /* Is JRE co-located with the application? */ sprintf(libjava, "%s/lib/%s/" JAVA_DLL, path, arch); if (access(libjava, F_OK) == 0) { @@ -734,7 +742,7 @@ ifn->GetDefaultJavaVMInitArgs = JNI_GetDefaultJavaVMInitArgs; return JNI_TRUE; #else - Dl_info dlinfo; + Dl_info dlinfo; void *libjvm; if (_launcher_debug) {