aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2013-08-07 14:21:25 (EDT)
committerSilenio Quarti2013-08-07 14:21:25 (EDT)
commit91dd10447c73ae7e45dc6d6bb4336f02f4e9ff4d (patch)
treeff4df8764138054c1b2c0140e872f622e5c11730
parent3256d9a9dff3d1e8fef267c78fe10bf28804ac99 (diff)
downloadrt.equinox.framework-91dd10447c73ae7e45dc6d6bb4336f02f4e9ff4d.zip
rt.equinox.framework-91dd10447c73ae7e45dc6d6bb4336f02f4e9ff4d.tar.gz
rt.equinox.framework-91dd10447c73ae7e45dc6d6bb4336f02f4e9ff4d.tar.bz2
Bug 411361 - [Mac] Kepler doesn't launch without JRE 6, even if JDK 7 is installed - back port to 4.3.1
-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 1a2391d..70d3242 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=506
+min_ver=507
LIB_VERSION = $(maj_ver)$(min_ver)