Skip to content
Permalink
Browse files

Merge pull request #634 from bluca/regen

Problem: missing files from last regen
  • Loading branch information...
sappo committed May 31, 2019
2 parents c272f59 + 4ec03c4 commit 8c64fe15cecc5e6ef67eeb75116e930d60cf5d8a
Showing with 26 additions and 0 deletions.
  1. +26 −0 bindings/jni/src/main/java/org/zeromq/tools/ZmqNativeLoader.java
@@ -0,0 +1,26 @@
package org.zeromq.tools;

import java.util.Set;
import java.util.HashSet;
import org.scijava.nativelib.NativeLoader;

public class ZmqNativeLoader {

private static final Set<String> loadedLibraries = new HashSet<>();

public static void loadLibrary(String libname) {
if (!loadedLibraries.contains(libname)) {
if (System.getProperty("java.vm.vendor").contains("Android")) {
System.loadLibrary(libname);
} else {
try {
NativeLoader.loadLibrary(libname);
} catch (Exception e) {
System.err.println("[WARN] " + e.getMessage() +" from jar. Assuming it is installed on the system.");
}
}
loadedLibraries.add(libname);
}
}

}

0 comments on commit 8c64fe1

Please sign in to comment.
You can’t perform that action at this time.