Loading from native code
A class loader loads native libraries for a class.
Class loaders look for native libraries in different places:
- If the class that makes the native call is loaded by the Bootstrap class loader, this loader looks in the path that is specified by the sun.boot.library.path property, to load the libraries.
- If the class that makes the native call is loaded by the Platform or
Application class loaders, these loaders look in the paths that are specified by the following
properties, in this order:
- sun.boot.library.path
- java.library.path
- If the class that makes the native call is loaded by a Custom class loader, this loader defines the search path to load libraries.