aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2013-06-26 10:35:15 (EDT)
committerSilenio Quarti2013-11-28 10:36:29 (EST)
commitfe84deb8c485e2504893b8eb4a8452c9365197b3 (patch)
tree0623d663803f7eca11aed337cd12cdd01939be17
parent667adf35ed2823ec37dcb89a7955ee6a08a006e6 (diff)
downloadrt.equinox.framework-fe84deb8c485e2504893b8eb4a8452c9365197b3.zip
rt.equinox.framework-fe84deb8c485e2504893b8eb4a8452c9365197b3.tar.gz
rt.equinox.framework-fe84deb8c485e2504893b8eb4a8452c9365197b3.tar.bz2
Bug 411361 - [Mac] Kepler doesn't launch without JRE 6, even if JDK 7 is installed
-rw-r--r--bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c29
-rw-r--r--bundles/org.eclipse.equinox.executable/library/make_version.mak2
2 files changed, 22 insertions, 9 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c
index 2870c62..6876732 100644
--- a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c
+++ b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c
@@ -120,20 +120,33 @@ static int isLibrary( _TCHAR* vm ){
return (_tcsicmp(ch, _T_ECLIPSE(".so")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".jnilib")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".dylib")) == 0);
}
+static void loadVMBundle( char * bundle ) {
+ CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)bundle, strlen(bundle), true);
+ javaVMBundle = CFBundleCreate(kCFAllocatorDefault, url);
+ CFRelease(url);
+}
+
/* Load the specified shared library
*/
void * loadLibrary( char * library ){
if (!isLibrary(library)) {
- CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)library, strlen(library), true);
- javaVMBundle = CFBundleCreate(kCFAllocatorDefault, url);
- CFRelease(url);
+ loadVMBundle(library);
return (void*) &javaVMBundle;
- } else {
- void * result= dlopen(library, RTLD_NOW);
- if(result == 0)
- printf("%s\n",dlerror());
- return result;
}
+ _TCHAR *bundle = strdup(library), *start;
+ if (strstr(bundle, "libjvm") && (start = strstr(bundle, "/Contents/")) != NULL) {
+ start[0] = NULL;
+ loadVMBundle(bundle);
+ free(bundle);
+ if (javaVMBundle) {
+ return (void*) &javaVMBundle;
+ }
+ }
+ free(bundle);
+ void * result= dlopen(library, RTLD_NOW);
+ if(result == 0)
+ printf("%s\n",dlerror());
+ return result;
}
/* Unload the shared library
diff --git a/bundles/org.eclipse.equinox.executable/library/make_version.mak b/bundles/org.eclipse.equinox.executable/library/make_version.mak
index f2e2f63..957293d 100644
--- a/bundles/org.eclipse.equinox.executable/library/make_version.mak
+++ b/bundles/org.eclipse.equinox.executable/library/make_version.mak
@@ -10,5 +10,5 @@
#*******************************************************************************
maj_ver=1
-min_ver=508
+min_ver=509
LIB_VERSION = $(maj_ver)$(min_ver)