public class NativeLibraryLoader extends Object
java.library.path
property after the start of the JVM.
Note that this method will only work for Java 8 up to Java 14.
The java.library.path
is read only once when the JVM starts up.
If you change this property using System.setProperty
, it won't make any difference.
The way this class work is by setting it to null prior to setting the new path. This method will unload the
previously specified paths and replace them by the new ones.
Note that this method will use a different mechanism for Java 8 and Java 9, and for Java 10 up to Java 14.Constructor and Description |
---|
NativeLibraryLoader() |
Modifier and Type | Method and Description |
---|---|
boolean |
loadLibraries(List<URL> libpaths)
This method allows to set the
java.library.path property after the start of the JVM. |
public boolean loadLibraries(List<URL> libpaths) throws LoadLibraryException
java.library.path
property after the start of the JVM.
Note that this method will only work for Java 8 up to Java 14.
This method will unload the previously specified paths and replace them by the new ones. Note that this method
will use a different mechanism for Java 8 and Java 9, and for Java 10 up to Java 14.libpaths
- the library pathsLoadLibraryException