From bd02bd59840ba71f6a42cbb464a0be6d0ed4c4ea Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Sat, 20 Jul 2024 10:01:08 +0200 Subject: [PATCH] Load using SymbolLookup --- src/test/java/io/airlift/compress/v2/HadoopNative.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/io/airlift/compress/v2/HadoopNative.java b/src/test/java/io/airlift/compress/v2/HadoopNative.java index f0b2d2d4..2de64faf 100644 --- a/src/test/java/io/airlift/compress/v2/HadoopNative.java +++ b/src/test/java/io/airlift/compress/v2/HadoopNative.java @@ -24,6 +24,8 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.lang.foreign.Arena; +import java.lang.foreign.SymbolLookup; import java.lang.reflect.Field; import java.net.URL; import java.nio.file.Files; @@ -120,7 +122,7 @@ private static void loadLibrary(String name) throw new RuntimeException(e); } - System.load(file.getAbsolutePath()); + System.out.println(SymbolLookup.libraryLookup(file.getAbsolutePath(), Arena.global())); } private static String getLibraryPath(String name)