Class NativeLibraryPathResolver
- java.lang.Object
-
- com.inductiveautomation.ignition.common.util.NativeLibraryPathResolver
-
public class NativeLibraryPathResolver extends java.lang.ObjectResolves file paths to native libraries based on the following file structure:/native/$os/$arch/native_lib_filename
Valid $os values include:
- win
- linux
- osx
- hpux
Valid $arch values include:
- x86
- x64
- arm
- itanium
This directory structure is used to load native library exports out of jar files.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetPlatformNativeSuffix()Returns the native suffix, along with the ".", eg ".dll"static java.lang.StringresolveLibFileAbsolutePath(java.lang.String libName)Resolves the absolute file path (ornull) to the library if it exists on the'java.library.path'static java.lang.StringresolvePath(java.lang.String filename)Resolve the path to filename based on the currentPlatform.static java.lang.StringresolvePath(java.lang.String filename, Platform platform)Resolve the path to filename based on the givenPlatform.
-
-
-
Method Detail
-
resolvePath
public static java.lang.String resolvePath(java.lang.String filename)
Resolve the path to filename based on the currentPlatform.- Parameters:
filename- The name of the native library file.- Returns:
- The path to the native library, taking into account the current
Platform.
-
resolvePath
public static java.lang.String resolvePath(java.lang.String filename, Platform platform)Resolve the path to filename based on the givenPlatform.
-
resolveLibFileAbsolutePath
@Nullable public static java.lang.String resolveLibFileAbsolutePath(@Nonnull java.lang.String libName)Resolves the absolute file path (ornull) to the library if it exists on the'java.library.path'- Parameters:
libName- The raw lib name. This is passed throughSystem.mapLibraryName(String)before file lookup occurs. Must not be null
-
getPlatformNativeSuffix
public static java.lang.String getPlatformNativeSuffix()
Returns the native suffix, along with the ".", eg ".dll"
-
-