diff --git a/ann/src/main/java/com/twitter/ann/faiss/NativeUtils.java b/ann/src/main/java/com/twitter/ann/faiss/NativeUtils.java index 1cc0af0b0..45c8faa8e 100644 --- a/ann/src/main/java/com/twitter/ann/faiss/NativeUtils.java +++ b/ann/src/main/java/com/twitter/ann/faiss/NativeUtils.java @@ -95,8 +95,8 @@ public final class NativeUtils { */ public static void loadLibraryFromJar(String path) throws IOException { File tempFile = unpackLibraryFromJarInternal(path); + copyResourceToFile(path, tempFile); try { - copyResourceToFile(path, tempFile); System.load(tempFile.getAbsolutePath()); } finally { tempFile.deleteOnExit();