in src/main/java/com/uber/h3core/H3CoreLoader.java [127:147]
public static synchronized NativeMethods loadNatives(OperatingSystem os, String arch)
throws IOException {
// This is synchronized because if multiple threads were writing and
// loading the shared object at the same time, bad things could happen.
if (libraryFile == null) {
final String dirName = String.format("%s-%s", os.getDirName(), arch);
final String libName = String.format("libh3-java%s", os.getSuffix());
final File newLibraryFile = createTempLibraryFile(os);
newLibraryFile.deleteOnExit();
copyResource(String.format("/%s/%s", dirName, libName), newLibraryFile);
System.load(newLibraryFile.getCanonicalPath());
libraryFile = newLibraryFile;
}
return new NativeMethods();
}