Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c
index 82e97194e..9ca48f16c 100644
--- a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c
+++ b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c
@@ -111,11 +111,20 @@ void displayMessage(char *title, char *message)
CFRelease(inDescription);
}
+static int isLibrary( _TCHAR* vm ){
+ _TCHAR *ch = NULL;
+ if (vm == NULL) return 0;
+ ch = _tcsrchr( vm, '.' );
+ if(ch == NULL)
+ return 0;
+ return (_tcsicmp(ch, _T_ECLIPSE(".so")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".jnilib")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".dylib")) == 0);
+}
+
/* Load the specified shared library
*/
void * loadLibrary( char * library ){
- if (strcmp(library, JAVA_FRAMEWORK) == 0) {
- CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)JAVA_FRAMEWORK, strlen(JAVA_FRAMEWORK), true);
+ if (!isLibrary(library)) {
+ CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)library, strlen(library), true);
javaVMBundle = CFBundleCreate(kCFAllocatorDefault, url);
CFRelease(url);
return (void*) &javaVMBundle;

Back to the top