Autopsy  3.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
Native Library Loading

Overview

This section outlines how Autopsy distributes native libraries and provides pointers for you if you want to distribute native libraries with your modules.

The easiest guidance (from http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#jni) is to put the native library in the release/modules/lib folder in your project. Or, in architecure-specific locations if your module is multi-platform. See the above page for examples. They will get copied from that location to somewhere that will be searched when Autopsy does a System.loadLibrary().

Autopsy Native Libraries

Autopsy has two types of native libraries:

libtsk_jni is embedded inside of the Tsk_DataModel.jar file from The Sleuth Kit. The java code extracts the file from the jar into a local temp folder and launches it in the LibraryUtils.loadSleuthkitJNI() method.

The libraries that libtsk_jni depends on are launched by Autopsy in the Installer.loadDynLibraries() method. This is because if we wait until libtsk_jni needs them, then they will be located based on Windows search paths and the NetBeans paths are not in that set. So, we launch them before libtsk_jni needs them and from within Autopsy so that it uses the Autopsy search pathes.

There is code in build-windows.xml and build-unix.xml to copy the external libraries into their respective locations when a ZIP package is made of the program. These libraries must be accessible via normal launching methods when developing Autopsy (i.e. we only copy them into the Autopsy structure when building the ZIP).


Copyright © 2012-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.