Bug 565913 - Eclipse fails to launch on MacOs Big Sur
Change-Id: I17a98703f06162251d60d573832ff23831d55721
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c
index 64dc3f1..cc8e9c1 100644
--- a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c
+++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c
@@ -426,7 +426,8 @@
}
}
cmd = command;
- if (strstr(cmd, "/JavaVM.framework/") != NULL && (strstr(cmd, "/Current/") != NULL || strstr(cmd, "/A/") != NULL)) {
+ if ((strstr(cmd, "/JavaVM.framework/") != NULL && (strstr(cmd, "/Current/") != NULL)) || strstr(cmd, "/A/") != NULL || strstr(cmd, "/usr/bin/java") != NULL ) {
+ //On Mac we have universal library at /usr/bin/java. But actual java is some where else. So if the path received is default path we need look for java home
cmd = getJavaHome();
if (cmd == NULL) {
return NULL;