[Libreoffice-commits] core.git: Branch 'libreoffice-4-2-1' - connectivity/com
Stephan Bergmann
sbergman at redhat.com
Fri Feb 14 11:26:09 CET 2014
connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeLibraries.java | 14 ++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
New commits:
commit b7bf74bd0a1ccd5f8c8732474bc3e180617481fb
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 13 22:43:31 2014 +0100
fdo#74683: java.lang.System.mapLibraryName dylib vs. jnilib confusion
Change-Id: I8fd7b908613a90c983f2244383432dd50ba10cdb
(cherry picked from commit a76261ac9e40eb57e942db2c7aea8b8a5e904ff2)
Reviewed-on: https://gerrit.libreoffice.org/8035
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeLibraries.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeLibraries.java
index db3d5f1..866f550 100644
--- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeLibraries.java
+++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeLibraries.java
@@ -44,8 +44,18 @@ final class NativeLibraries {
} catch (UnsatisfiedLinkError e) {
ClassLoader cl = NativeLibraries.class.getClassLoader();
if (cl instanceof URLClassLoader) {
- URL url = ((URLClassLoader) cl).findResource(
- System.mapLibraryName(libname));
+ String sysname = System.mapLibraryName(libname);
+ // At least Oracle's 1.7.0_51 now maps to .dylib rather than
+ // .jnilib:
+ if (System.getProperty("os.name").startsWith("Mac")
+ && sysname.endsWith(".dylib"))
+ {
+ sysname
+ = sysname.substring(
+ 0, sysname.length() - "dylib".length())
+ + "jnilib";
+ }
+ URL url = ((URLClassLoader) cl).findResource(sysname);
if (url != null) {
try {
System.load(
More information about the Libreoffice-commits
mailing list