From 8132815be78ffbffce94dac7b11d89cd8c4e71a8 Mon Sep 17 00:00:00 2001 From: Brian Carrier <carrier@sleuthkit.org> Date: Wed, 15 Jan 2014 16:08:35 -0500 Subject: [PATCH] updated docs on loading procedure, doxygen basics, and made SleuthkitJNI have a private constructor since it is a utility class --- bindings/java/README.txt | 22 ++++++++++++++----- bindings/java/doxygen/main.dox | 18 ++++++++++++++- .../org/sleuthkit/datamodel/SleuthkitJNI.java | 3 ++- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/bindings/java/README.txt b/bindings/java/README.txt index 6cfae9b04..4ffcf8149 100644 --- a/bindings/java/README.txt +++ b/bindings/java/README.txt @@ -16,6 +16,7 @@ from the C/C++ code. Requirements: * Java JDK * Ant +* Jar files as listed in ivy.xml (which will get downloaded automatically) Building the Dynamic Library (for JNI) @@ -37,14 +38,25 @@ 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 -Make sure the Jar file is in your CLASSPATH. The dynamic library -will also need to be available when the program is run. Typically -that means that it must be in the path. Refer to the javadocs for -details on using the API +There are two categories of things that need to be in the right place: +- The Jar file needs to be on the CLASSPATH. +- The libewf and zlib dynamic libraries need to be loadable. The TSK + native library is inside of the Jar file and it will depend on the + libewf and zlib libraries. On a Unix-like platform, that means that + if you did a 'make install' with libewf and zlib, you should be OK. + On Windows, you should copy these dlls to a place that is found based + on the rules of Windows library loading. Note that these locations are + based on the rules of Windows loading them and not necessarily based on + java's loading paths. + +Refer to the javadocs for details on using the API: + http://sleuthkit.org/sleuthkit/docs/jni-docs/ + ------------ Brian Carrier -Nov 11, 2011 +Jan 2014 diff --git a/bindings/java/doxygen/main.dox b/bindings/java/doxygen/main.dox index 7a5d8dc48..a9c4a58ee 100644 --- a/bindings/java/doxygen/main.dox +++ b/bindings/java/doxygen/main.dox @@ -6,7 +6,23 @@ These classes allow Java programs to access data extracted by The Sleuth Kit. The Sleuth Kit is primarily a C/C++ library and set of command line tools. These classes allow programs to obtain the data that TSK can produce. The typical steps would be to use JNI to cause the TSK library to create and populate a SQLite database. The Java classes then directly open the SQLite database and perform queries on it. -Expand on this to mention what classes to use, etc. +\section basics Basic + +NOTE: This needs to be expanded on. + +\subsection basics_add Adding Data to Case + +Use SleuthkitCase.newCase() or SleuthkitCase.openCase() to return an instance of a SleuthkitCase object. To add data to the case, use SleuthkitCase.makeAdImageProcess() to get a AddImageProcess object that allows you to populate the database in the scope of a transaction and get feedback on its update process. + +To add a local file (logical file) you can use methods such as SleuthkitCase.addLocalFile(). + + +\subsection basics_analyzing Analyzing Data in Case + +You can either access files directly using methods such as SleuthkitCase.findFiles() or SleuthkitCase.getAbstractFileById(). + +You can also access the data in its tree form by starting with SleuthkitCase.getImages() and then calling getChildren() on each of the returned objects. See the section below on basics of the datamodel structure. + \section jni_hierarchy Class Hierarchy diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java index edf73f7cb..d915b9c42 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java @@ -135,7 +135,8 @@ public class SleuthkitJNI { LibraryUtils.loadSleuthkitJNI(); } - public SleuthkitJNI() { + private SleuthkitJNI() { + } /** -- GitLab