lidavidm commented on code in PR #883:
URL: https://github.com/apache/arrow-java/pull/883#discussion_r2425912228
##########
c/src/main/java/org/apache/arrow/c/jni/JniLoader.java:
##########
@@ -75,8 +75,24 @@ private synchronized void loadRemaining() {
}
private void load(String name) {
+ String libraryName = System.mapLibraryName(name);
+
+ // If 'arrow.cdata.library.path' is defined, try to load the native
library from there
+ String libraryPath = System.getProperty("arrow.cdata.library.path");
+ if (libraryPath != null) {
+ try {
+ File libraryFile = new File(libraryPath, libraryName);
+ if (libraryFile.isFile()) {
+ System.load(libraryFile.getAbsolutePath());
+ return;
+ }
+ } catch (UnsatisfiedLinkError e) {
+ // Ignore this error and fall back to extracting from the JAR file
Review Comment:
Hmm, we can leave it as is then.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]