Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2013-06-26 14:35:15 +0000
committerSilenio Quarti2013-06-26 14:45:50 +0000
commitbcec7c003442e38dd5160ff5ed394159eebeb89a (patch)
tree39c2ad155255f635191e88e1cd324f1084430cc0 /bundles
parentb492ede68e6b06f3457ccc440da6a82a4d5af246 (diff)
downloadrt.equinox.framework-bcec7c003442e38dd5160ff5ed394159eebeb89a.tar.gz
rt.equinox.framework-bcec7c003442e38dd5160ff5ed394159eebeb89a.tar.xz
rt.equinox.framework-bcec7c003442e38dd5160ff5ed394159eebeb89a.zip
Bug 411361 - [Mac] Kepler doesn't launch without JRE 6, even if JDK 7 is installed
Diffstat (limited to 'bundles')
-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 2870c62e8..68767328b 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 1a2391d35..94682caab 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=600
LIB_VERSION = $(maj_ver)$(min_ver)

Back to the top