File tree Expand file tree Collapse file tree 2 files changed +11
-17
lines changed
src/com/oracle/appbundler Expand file tree Collapse file tree 2 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -89,21 +89,19 @@ int launch(char *commandName) {
89
89
// Locate the JLI_Launch() function
90
90
NSString *runtime = [infoDictionary objectForKey: @JVM_RUNTIME_KEY];
91
91
92
- JLI_Launch_t jli_LaunchFxnPtr = NULL ;
92
+ const char *libjliPath = NULL ;
93
93
if (runtime != nil ) {
94
- NSURL *runtimeBundleURL = [[[NSBundle mainBundle ] builtInPlugInsURL ] URLByAppendingPathComponent: runtime];
95
- CFBundleRef runtimeBundle = CFBundleCreate (NULL , (CFURLRef)runtimeBundleURL);
96
-
97
- NSError *bundleLoadError = nil ;
98
- Boolean runtimeBundleLoaded = CFBundleLoadExecutableAndReturnError (runtimeBundle, (CFErrorRef *)&bundleLoadError);
99
- if (bundleLoadError == nil && runtimeBundleLoaded) {
100
- jli_LaunchFxnPtr = CFBundleGetFunctionPointerForName (runtimeBundle, CFSTR (" JLI_Launch" ));
101
- }
94
+ NSString *runtimePath = [[[NSBundle mainBundle ] builtInPlugInsPath ] stringByAppendingPathComponent: runtime];
95
+ libjliPath = [[runtimePath stringByAppendingPathComponent: @" Contents/Home/jre/lib/jli/libjli.dylib" ] fileSystemRepresentation ];
102
96
} else {
103
- void *libJLI = dlopen (LIBJLI_DYLIB, RTLD_LAZY);
104
- if (libJLI != NULL ) {
105
- jli_LaunchFxnPtr = dlsym (libJLI, " JLI_Launch" );
106
- }
97
+ libjliPath = LIBJLI_DYLIB;
98
+ }
99
+
100
+ void *libJLI = dlopen (libjliPath, RTLD_LAZY);
101
+
102
+ JLI_Launch_t jli_LaunchFxnPtr = NULL ;
103
+ if (libJLI != NULL ) {
104
+ jli_LaunchFxnPtr = dlsym (libJLI, " JLI_Launch" );
107
105
}
108
106
109
107
if (jli_LaunchFxnPtr == NULL ) {
Original file line number Diff line number Diff line change @@ -352,10 +352,6 @@ private void copyRuntime(File plugInsDirectory) throws IOException {
352
352
File pluginContentsDirectory = new File (pluginDirectory , runtimeContentsDirectory .getName ());
353
353
pluginContentsDirectory .mkdir ();
354
354
355
- // Copy MacOS directory
356
- File runtimeMacOSDirectory = new File (runtimeContentsDirectory , "MacOS" );
357
- copy (runtimeMacOSDirectory , new File (pluginContentsDirectory , runtimeMacOSDirectory .getName ()));
358
-
359
355
// Copy Info.plist file
360
356
File runtimeInfoPlistFile = new File (runtimeContentsDirectory , "Info.plist" );
361
357
copy (runtimeInfoPlistFile , new File (pluginContentsDirectory , runtimeInfoPlistFile .getName ()));
You can’t perform that action at this time.
0 commit comments