MCPcopy Index your code
hub / github.com/questdb/questdb / tryLoadFromDistribution

Method tryLoadFromDistribution

core/src/main/java/io/questdb/std/Os.java:310–326  ·  view source on GitHub ↗
(String cxxLibName, String rustLibName)

Source from the content-addressed store, hash-verified

308 }
309
310 private static boolean tryLoadFromDistribution(String cxxLibName, String rustLibName) {
311 String libsDir = getNativeLibsDir(cxxLibName);
312 if (libsDir == null) {
313 return false;
314 }
315
316 try {
317 // we are in a binary distribution, let's load libraries from the libs dir
318 System.load(Paths.get(libsDir, cxxLibName).toAbsolutePath().toString());
319 System.load(Paths.get(libsDir, rustLibName).toAbsolutePath().toString());
320 } catch (Throwable e) {
321 // if we fail to load distribution libraries, we will try to load them from the jar
322 System.err.println("Failed to load libraries from " + libsDir + ": " + e.getMessage());
323 return false;
324 }
325 return true;
326 }
327
328 static {
329 if ("aarch64".equals(System.getProperty("os.arch"))) {

Callers 1

OsClass · 0.95

Calls 6

getNativeLibsDirMethod · 0.95
loadMethod · 0.65
toStringMethod · 0.65
getMethod · 0.65
printlnMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected