Bug 31186

Summary: MacOSX - Unable to access external paths to shared libs
Product: [Eclipse Project] JDT Reporter: Alan Hawrelak <alangh>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: major    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC1   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Alan Hawrelak CLA 2003-02-06 18:58:45 EST
Running on MacOSX 10.2.3
Using Eclipse eclipse-SDK-I20030129-macosx-carbon.zip

[I think this bug really means one cannot run a java application on MacOSX that
accesses a native shared library.]
Here is a specific instance, attempting to run as a Java Application, the SWT
example at:

http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/platform-swt-home/dev.html#snippets
for scroll an image flicker free.
About the only thing significant for that application is that it uses SWT, and
is run as an application.

In order to run, that will need a access to the SWT.jar, which requires access
to the shared library: 

org.eclipse.swt.carbon_2.1.0/os/macosx/ppc/libswt-carbon-2126.jnilib

That access is provided by specifying a VM Argument in the Run Configuration:

-Djava.library.path=/Volumes/FWDrive2/eclipse_Jan29_03/eclipse/plugins/org.eclipse.swt.carbon_2.1.0/os/macosx/ppc/libswt-carbon-2126.jnilib

However, eclipse will return an error, when it attempts to access that.
I do not know if this may somehow be a product of the fact that eclipse is
running on a non-boot drive?!

This problem with specifying paths has been run into elsewhere, unfortunately I
do not have record of the circumstance.
Comment 1 Andre Weinand CLA 2003-02-07 05:43:50 EST
The -Djava.library.path argument expects the directory containing the library, not the 
library itself. Remove the last component from the path, and I'm sure it will work. 
Comment 2 Alan Hawrelak CLA 2003-02-07 11:40:09 EST
Andre's comment got it. Specifying the containing folder rather than the library
file has it working. This bug should be removed.