Skip to content

itcraft-cn/nativeloader

Repository files navigation

nativeloader

a simple native loader for java

中文文档

usage 1

use SimpleLibInfo

try {
    NativeLoader.load(new SimpleLibInfo("x"));
} catch (Exception e) {
    LOGGER.warn(e.getMessage(), e);
    throw e;
}

the NativeLoader will try to:

  1. try to load the library from the system path
  2. try to load the library from the classpath, and copy it to the tmp directory
  3. try to load the library from given path by set in java env

usage 2

implement LibInfo

public class LibAInfo implements LibInfo {
    ...
}
// usage
try{
    NativeLoader.load(new LibAInfo());
} catch (Exception e) {
    LOGGER.warn(e.getMessage(), e);
    throw e;
}

ChangeLog

ChangeLog

About

a simple native loader for java

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages