Skip to content

Commit

Permalink
Load using SymbolLookup
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo committed Jul 20, 2024
1 parent df38ec6 commit bd02bd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/java/io/airlift/compress/v2/HadoopNative.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bd02bd5

Please sign in to comment.