Skip to content

senzing-garage/sz-sdk-java

Repository files navigation

sz-sdk-java

If you are beginning your journey with Senzing, please start with Senzing Quick Start guides.

Overview

The Senzing Java SDK provides the Java interface to the native Senzing SDK's. This repository is dependent on the Senzing native shared library (.so, .dylib or .dll) that is part of the Senzing product and function without it.

While this SDK is being made available as open source the actual sz-sdk.jar file that you use should be obtained from Senzing product installation to ensure that the Java code version matches the native library version.

Prerequistes

  1. Java OpenJDK 17 (or later) is required to build.
  2. Apache Maven v3.8.5 or later
  3. Senzing v4.0 or later (for running unit tests)
  4. Set the SENZING_PATH environment variable if not using the default locations below:
    • Linux: export SENZING_PATH=/opt/senzing
    • macOS: export SENZING_PATH=$HOME/senzing
    • Windows: set SENZING_PATH=%USERPROFILE%\senzing
  5. Set your library path appropriately for Senzing libraries:
    • Linux: Set the LD_LIBRARY_PATH:

      export LD_LIBRARY_PATH=/opt/senzing/er/lib:$LD_LIBRARY_PATH
    • macOS: Set DYLD_LIBRARY_PATH:

      export DYLD_LIBRARY_PATH=$HOME/senzing/er/lib:$HOME/senzing/er/lib/macos:$DYLD_LIBRARY_PATH
    • Windows: Set Path:

      set Path=%USERPROFILE%\senzing\er\lib;%Path%

Building

  1. To build simply execute:

    mvn package
    • The JAR file will be located at target/sz-sdk.jar.
    • The Javadoc JAR file will be located at target/sz-sdk-javadoc.jar.
  2. To build and install in the local maven repository:

    mvn install
    • The JAR file will be located at target/sz-sdk.jar.
    • The Javadoc JAR file will be located at target/sz-sdk-javadoc.jar.
  3. To build without running unit tests:

    mvn -DskipTests=true package
  4. Clean up build artifacts:

    mvn clean

The JAR file will be located at target/sz-sdk.jar.

The Javadoc JAR file will be located at target/sz-sdk-javadoc.jar