Class LibraryLoader
- java.lang.Object
-
- org.drasyl.channel.tun.jna.windows.loader.LibraryLoader
-
public class LibraryLoader extends Object
Helper class to load the library from the preferred location.
-
-
Field Summary
Fields Modifier and Type Field Description static String
BUNDLED_ONLY
static String
PREFER_BUNDLED
static String
PREFER_SYSTEM
static String
SYSTEM_ONLY
-
Constructor Summary
Constructors Constructor Description LibraryLoader(Class classToRegister)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
getPathInResources(String name)
static String
getPlatformDependentPath(String libFullName)
void
loadLibrary(String mode, String systemFallBack)
void
loadSystemLibrary(String library)
-
-
-
Field Detail
-
PREFER_SYSTEM
public static final String PREFER_SYSTEM
- See Also:
- Constant Field Values
-
PREFER_BUNDLED
public static final String PREFER_BUNDLED
- See Also:
- Constant Field Values
-
BUNDLED_ONLY
public static final String BUNDLED_ONLY
- See Also:
- Constant Field Values
-
SYSTEM_ONLY
public static final String SYSTEM_ONLY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LibraryLoader
public LibraryLoader(Class classToRegister)
-
-
Method Detail
-
getPathInResources
public static String getPathInResources(String name) throws IOException
- Throws:
IOException
-
loadSystemLibrary
public void loadSystemLibrary(String library) throws IOException
- Throws:
IOException
-
loadLibrary
public void loadLibrary(String mode, String systemFallBack) throws IOException
- Throws:
IOException
-
-