Native library loader for extracting and loading native libraries from Java.
Clone or download
ctrueden Bump to next development cycle
Signed-off-by: Curtis Rueden <>
Latest commit c049131 Nov 17, 2018

About native library loader

The native library loader is a utility that assists with loading native libraries from Java. It provides the ability to painlessly identify, extract and load the correct platform-specific native library from a JAR file.


Simplified BSD License


Add dependency

Search Maven Central for latest version and add a dependency to your pom.xml.


Package native libraries

Native libraries should be packaged into a single jar file, with the following directory & file structure:


Here "xxx" is the name of the native library and "-vvv" is an optional version number. Depending on the platform at runtime, a native library will be unpacked into a temporary file and will be loaded from there.

The version information will be grabbed from the file from "Implementation-Version" entry. So it's recommended to follow Java's package version information convention.

Load library

If you want to load 'awesome.dll' (on Windows) or '' (on Linux), simply do like this ...