Author: jsc
Date: Wed Feb 26 07:34:14 2014
New Revision: 1571944

URL: http://svn.apache.org/r1571944
Log:
#124315# merge fix from trunk

Modified:
    
openoffice/branches/AOO410/main/jurt/com/sun/star/lib/util/NativeLibraryLoader.java

Modified: 
openoffice/branches/AOO410/main/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
URL: 
http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/jurt/com/sun/star/lib/util/NativeLibraryLoader.java?rev=1571944&r1=1571943&r2=1571944&view=diff
==============================================================================
--- 
openoffice/branches/AOO410/main/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
 (original)
+++ 
openoffice/branches/AOO410/main/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
 Wed Feb 26 07:34:14 2014
@@ -48,8 +48,18 @@ public final class NativeLibraryLoader {
         library name is system dependent
      */
     public static void loadLibrary(ClassLoader loader, String libname) {
+        String syslibname = System.mapLibraryName(libname);
+        
         File path = getResource(loader, System.mapLibraryName(libname));
         if (path == null) {
+            // check special jni lib extension on Mac
+            if (syslibname.contains("dylib")) {
+                syslibname = syslibname.replace("dylib", "jnilib");
+            }
+            path = getResource(loader, syslibname);
+        }
+
+        if (path == null) {
             // If the library cannot be found as a class loader resource, try
             // the global System.loadLibrary as a last resort:
             System.loadLibrary(libname);


Reply via email to