Update NativeUtils.java

move function
This commit is contained in:
Mohanned Anwar 2023-04-05 10:16:48 +03:00 committed by GitHub
parent c51fe59e2f
commit 9eb5089eae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();