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) {
8989 // Locate the JLI_Launch() function
9090 NSString *runtime = [infoDictionary objectForKey: @JVM_RUNTIME_KEY];
9191
92- JLI_Launch_t jli_LaunchFxnPtr = NULL ;
92+ const char *libjliPath = NULL ;
9393 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 ];
10296 } 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" );
107105 }
108106
109107 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 {
352352 File pluginContentsDirectory = new File (pluginDirectory , runtimeContentsDirectory .getName ());
353353 pluginContentsDirectory .mkdir ();
354354
355- // Copy MacOS directory
356- File runtimeMacOSDirectory = new File (runtimeContentsDirectory , "MacOS" );
357- copy (runtimeMacOSDirectory , new File (pluginContentsDirectory , runtimeMacOSDirectory .getName ()));
358-
359355 // Copy Info.plist file
360356 File runtimeInfoPlistFile = new File (runtimeContentsDirectory , "Info.plist" );
361357 copy (runtimeInfoPlistFile , new File (pluginContentsDirectory , runtimeInfoPlistFile .getName ()));
You can’t perform that action at this time.
0 commit comments