[ 
https://issues.apache.org/jira/browse/FELIX-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552923
 ] 

Marcel Offermans commented on FELIX-439:
----------------------------------------

about 3)

If you look at the implementation for ClassLoader.loadLibrary() on the Mac, you 
see it first asks the classloader of the class that loads the library, and then 
tries to use the system and user library paths, iterating over them in turn. 
The interesting thing is that it first uses System.mapLibrary() as Karl 
explains to create the mapping from logical to physical name (ie: foo -> 
libfoo.jnilib) and then "hardcoded" assumes the extension is .jnilib and if 
that file cannot be found, replaces the extension with .dylib (using 
replaceFirst() which does not really work well if there are multiple substrings 
called .jnilib, but that's another matter). At least we can improve by 
emulating this behaviour in its intended way.

> Improve native code loading
> ---------------------------
>
>                 Key: FELIX-439
>                 URL: https://issues.apache.org/jira/browse/FELIX-439
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>
> We need to improve native code loading in three areas:
> 1) bundle installation should fail in case a native library is not in the jar 
> but in the header clause that is selected for the current platform.
> 2) we should only use the first library we find of a given name.
> 3) on MacOSX there are two extensions accepted by java namely, .jnilib and 
> .dylib but System.mapLibrary() returns only the .jnilib extension.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to