Menu
Simba Technologies
Simba Technologies

SimbaEngine X SDK 10.1.3
Developing Drivers for Data Stores Without SQL

Java on Linux/Unix/macOS

Java drivers consist of two components: the native (C++) component and the Java DSII. For the native component, this section outlines the settings needed in your Makefile in order to compile your driver. For information on the options that are present in our sample Makefiles, please refer to C++ on Linux, Unix, and MacOS C++ on Linux, Unix, and MacOS. See the JavaQuickstart makefiles and any .mak files that it references for further information. Our sample makefiles for JavaQuickstart include a reference to Platform.mak and other make files in the SDK detect the platform and choose the appropriate settings. For the Java DSII, any special considerations are outlined.

Build as a JDBC Driver

The SimbaEngine JavaUltraLight sample driver demonstrates connections to SQL data sources using SimbaJDBC.

  1. Ensure that the SimbaJDBC JAR file, located at [INSTALL_DIRECTORY]\DataAccessComponents\Lib, is in the classpath.
  2. Create your driver DSII JAR file.
  3. No additional libraries need to be linked.

Build as an ODBC Driver (a Shared Object) for local connections

To build a driver as a Shared Object, all the basic settings for C++ drivers from C++ on Linux, Unix, and MacOS apply to the native (C++) component with a few additions:

  1. Include the following libraries when linking:
    • libSimbaJNIDSI_<TARGET>.a

    <TARGET> is one of these four values: debug, debug_unixODBC, release or release_unixODBC

    See section C++ on Linux, Unix, and MacOS, “C++ on Linux, Unix, and MacOS” above for an explanation and notes on each option.

  2. Link in the JVM library:

    Location depends on bitness and the Java installation. See JavaQuickstart for examples. For example, for a 64-bit JavaQuickstart under Linux, add this to the link command:

    -L$(JAVA_HOME)/jre/lib/amd64/server –ljvml

    Note that JAVA_HOME is an environment variable that should refer to the appropriate Java installation directory. For a Java Development Kit (JDK), the location of the JVM on 32-bit Unix is usually in <Java Home>/jre/lib/<architecture>/client (example: <architecture> on Linux is i386), while on 64-bit Unix it is usually in <Java Home>/jre/lib/<architecture>/server (example: <architecture> on Linux is amd64).

  3. Include the JNIDSI and Java include paths:
    • $(JAVA_HOME)/include
    • $(SIMBAENGINE_DIR)/Include/JNIDSI

    For the Java DSII, all you need to do is to ensure that the SimbaJavaDSI.jar is included in your build process. In the sample driver, the ANT build script packages the pre-compiled files with those of the DSII.

Build as a SimbaServer (an Executable) for remote connections

To build a driver as a stand-alone SimbaServer executable, the key settings for the native (C++) component are the same as for C++ drivers. For the Java DSII, all you need to do is to ensure that the SimbaJavaDSI.jar is included in your build process. In the sample driver, the ANT build script packages the pre-compiled files with those of the DSII.

Building with Simba SQLEngine

The SimbaEngine JavaQuickstart sample driver demonstrates connections to non-SQL data sources using Simba SQLEngine. The settings for the native (C++) component are the same as for the C++ drivers as described in C++ on Linux, Unix, and MacOS. For the Java DSII, all you need to do is to ensure that the SimbaJavaDSI.jar is included in your build process. In the sample driver, the ANT build script packages the pre-compiled files with those of the DSII.

Building without Simba SQLEngine

The SimbaEngine JavaUltraLight sample driver demonstrates connections to SQL data sources without using Simba SQLEngine.

  1. All settings apply from either Java on Linux/Unix/macOS or Java on Linux/Unix/macOS above, depending on ODBC Driver or SimbaServer configuration.
  2. No additional libraries need to be linked.
  3. No additional paths need to be included.

Building with the Java Simba SQLEngine

The SimbaEngine JavaQuickJson sample driver demonstrates connections to non‑SQL data sources using the Java Simba SQLEngine. The Java Simba SQLEngine is available in the version 10.0 and above of the SDK. Using the Java Simba SQLEngine allows drivers to be written completely in Java without the need to use the C++ SQLEngine and JNIDSI bridge. For the Java DSII, all you need to do is to ensure that the SimbaSQLEngine.jar is included in your build process. In the sample driver, the ANT build script packages the pre-compiled files with those of the DSII.