Skip to content
Snippets Groups Projects
Commit e273756e authored by Brian Carrier's avatar Brian Carrier
Browse files

Updated Datamodel comments

parent 5e653ffc
No related branches found
No related tags found
No related merge requests found
...@@ -13,30 +13,38 @@ To use the Java bindings, you must have the Sleuth Kit datamodel ...@@ -13,30 +13,38 @@ To use the Java bindings, you must have the Sleuth Kit datamodel
JAR file compiled and have compiled the associated dynamic library JAR file compiled and have compiled the associated dynamic library
from the C/C++ code. from the C/C++ code.
Requirements:
Building The Jar File
You will need:
* The sqlitejdbc Jar file:
http://www.xerial.org/maven/repository/artifact/org/xerial/sqlite-jdbc/ (newest version is at the BOTTOM)
* Java JDK * Java JDK
* Ant * Ant
Place the JAR file in the 'lib' folder.
Build with the default ant target (by running 'ant') Building the Dynamic Library (for JNI)
The win32 Visual Studio solution has a tsk_jni project that will
build the JNI dll. To use this project, you will need to have
JDK_HOME environment variable set to the root directory of JDK.
Building the Dynamic Library (for JNI) On non-windows environments, it should just build as part of running
./configure and make. If the needed Java components are not found,
it will not be built.
To build the .dll build the win32 visual studio project. You will
need to have a version of JDK for the .dll to build. You will need
to set the JDK_HOME environment variable If it is not already set. Building The Jar File
Build with the default ant target (by running 'ant'). This will
download the required libraries (using ivy) and place the jar file
in the dist folder along with the needed dll and library files.
Using the Jar file and Library Using the Jar file and Library
Make sure the Jar file is in your CLASSPATH. The dynamic library Make sure the Jar file is in your CLASSPATH. The dynamic library
will also need to be available when the program is run. Typically will also need to be available when the program is run. Typically
that means that it must be in the path. that means that it must be in the path. Refer to the javadocs for
details on using the API
------------
Brian Carrier
Nov 11, 2011
...@@ -18,6 +18,9 @@ <h3><b>Data Mapping</b></h3> ...@@ -18,6 +18,9 @@ <h3><b>Data Mapping</b></h3>
<p>Use TskData to map integer and enum values back to their meaning. For example, the file system type will be returned as an integer and TskData maps it to NTFS or FAT.</p> <p>Use TskData to map integer and enum values back to their meaning. For example, the file system type will be returned as an integer and TskData maps it to NTFS or FAT.</p>
<h3><b>JNI</b></h3> <h3><b>JNI</b></h3>
<p>The bulk of the analysis occurs in the C/C++ code. JNI is used to run the C/C++ code from Java. The JNI methods are all located in the SleuthkitJNI class as static methods. It returns handles that refer to data structures in the C/C++ land. You should never have to directly call these methods. This class and its methods are used by the other data model classes.</p> <p>The bulk of the analysis occurs in the C/C++ code. JNI is used to run the C/C++ code from Java. The JNI methods are all located in the SleuthkitJNI java class as static methods. It returns handles that refer to data structures in the C/C++ land. You should never have to directly call these static Java methods. This class and its methods are used by the other Java data model classes.</p>
<h3>Error Handling</h3>
<p>The C/C++ code uses return codes and such for error handling. The C/C++ JNI code turns any errors into a TskException that gets thrown into the Java code. The Datamodel Java code will not catch these exceptions and instead they will be passed up to the other Java code that called the datamodel code. </p>
</body> </body>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment