diff --git a/bindings/java/README.txt b/bindings/java/README.txt index 6cfae9b04f7a238c97e930349b01fccf08381c01..4ffcf81494700ffb618bb731397569d955eccc2f 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 7a5d8dc489c2feea8461dc09c245e14510ab578a..a9c4a58eeb1f2bd66846d2dfd8b6944eabb4d975 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 edf73f7cb20c46116c2c25442de1e23077be0d6e..d915b9c4237151f94e9848325ebe43a941e8b02b 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() { + } /**