Bug 31186 - MacOSX - Unable to access external paths to shared libs
Summary: MacOSX - Unable to access external paths to shared libs
Status: CLOSED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-06 18:58 EST by Alan Hawrelak CLA
Modified: 2003-03-23 12:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.