Use the Military Analyst/MOLE Java sample applications on Linux

Last Published: April 25, 2020


When Java applications that depend on Defense Solutions MOLE/Military Analyst libraries are run on Linux with ArcGIS 10, the following error displays when invoking objects from these libraries:

"[java] AutomationException: 0x80040154 - Class not registered"

Instructions provided describe the workaround, which is to force the load of these libraries at runtime using a JNI call.


The files in this folder create a library called '', which is needed to create DefenseSolutions (MOLE or Military Analyst) objects in Java in ArcGIS Engine releases starting at ArcGIS Defense Solutions 10.

This folder contains/builds a C library that acts as a Java Native Interface (JNI) wrapper to call the required C-initialization method 'DSInitialize'.

The 'Makefile' builds and copies the library, '', to $ARCGISENGINEHOME/bin. If this library needs to be placed in another location, the following must be added to the location/folder: LD_LIBRARY_PATH.

Requirements: ArcGIS Engine Runtime + CPPAPI + Java.

  1. Run 'make' from the $ARCGISENGINEHOME/bin folder. This builds '' and copies it to $ARCGISENGINEHOME/bin.

    If the ArcGIS Engine CPPAPI is not installed or a C build environment is not configured, a pre-built library file has been provided: Rename this file to and manually copy it to $ARCGISENGINEHOME/bin. This pre-built binary has been tested only on a Redhat 4, 32-bit machine.
  2. Insert the following code to the project or add the provided file to the project:

    package arcgissamples.defensesolutions;

    public class DefSolInitializer {
    /* Native method declaration */
    public native void initDefSol(); // needed to load COM types after 9.3.1

    /* Use static intializer */
    static {
  3. From the Java application requiring Defense Solution(MOLE/MA) libraries, add this code immediately after the call to AOInitialize().initialize:

    // Force load of Defense Solution Libraries:
    new arcgissamples.defensesolutions.DefSolInitializer().initDefSol();

Article ID:000011042

  • Legacy Products
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic