package com.anton.fastcloud.bindings;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

public class Bindings {
    public static void init() {
        try {
            Path tempDirPath = Files.createTempDirectory("fastcloud-natives");
            for (String libName : new String[] {"libbindings.so"}) {
                Path libPath = tempDirPath.resolve(libName);
                Files.copy(FuseLibNative.class.getResourceAsStream("/" + libName), libPath);
                System.load(libPath.toString());
                if (!libPath.toFile().delete()) {
                    throw new IOException("Can't remove temp files");
                }
            }
            if (!tempDirPath.toFile().delete()) {
                throw new IOException("Can't remove temp files");
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

@@ -140,16 +140,82 @@
 dings %7B%0A
+    public static final String%5B%5D LIB_NAMES = %7B%22libbindings.so%22%7D;%0A%0A
     publ
@@ -369,39 +369,17 @@
 e : 
-new String%5B%5D %7B%22libbindings.so%22%7D
+LIB_NAMES
 ) %7B%0A

Extract constant