Package ai.catboost.common
Class NativeLib
java.lang.Object
ai.catboost.common.NativeLib
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidDelete old native librariesprivate static voidcopyFileFromJar(String pathWithinJar, String pathOnDisk) private static StringcreateTemporaryFileFromJar(String pathWithinJar) private static String[]private static voidloadNativeLibraryFromJar(String libName) static voidLoad libName, first will try try to load libName from default location then will try to load library from JAR.
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
LOCK_EXT
- See Also:
-
-
Constructor Details
-
NativeLib
public NativeLib()
-
-
Method Details
-
smartLoad
Load libName, first will try try to load libName from default location then will try to load library from JAR.- Parameters:
libName-- Throws:
IOException
-
getCurrentMachineResourcesDirs
-
loadNativeLibraryFromJar
- Throws:
IOException
-
copyFileFromJar
private static void copyFileFromJar(@Nonnull String pathWithinJar, @Nonnull String pathOnDisk) throws IOException - Throws:
IOException
-
createTemporaryFileFromJar
@Nonnull private static String createTemporaryFileFromJar(@Nonnull String pathWithinJar) throws IOException, IllegalArgumentException - Throws:
IOExceptionIllegalArgumentException
-
cleanup
Delete old native libraries
-