AtlasMap can import a Java archive file and display mappable fields in either the source or target panel. In the data mapper, each class-wide public entity in a class file that is in the imported JAR file becomes a mappable field.

Arrays and data types are more discretely defined.

Consider the following two files:

Bicycle.java:

package io.paul;
import io.paul.GeoLocation;

public class Bicycle {
    public int cadence;
    public int gear;
    public int speed;
    public float[] seatHeight;
    public String[] color;
    public GeoLocation geoLocation;
}
GeoLocation.java:
package io.paul;

public class GeoLocation {
    double lattitude;
    double longitude;
}

To import these files:

  1. Compile the Java files and assemble the results into a Java archive file. For example, invoke the following commands to create the Bicycle.jar file:

    javac -cp io.paul:. -d . GeoLocation.java Bicycle.java
    jar cvf ../Bicycle.jar *
  2. In the main toolbar, click the AtlasMap menu and select Import a catalog (.adm). Import.

  3. In the Open dialog, navigate to the Bicycle.jar file and click Open.

  4. At the top of the Source panel, click + to import the fields into the source panel.

    To display imported fields in the Target panel, you would click + at the top of the Target panel.

  5. In the Load Java Document From Custom Class dialog, in the Custom class name field, select the class package name of the Java class. For example, in Bicycle.jar file, the class package name is io.paul.Bicycle.

  6. Click OK. If you import the sample Bicycle.jar file into the the Source panel, you would now see something like the following. The fields that are in the imported Java class files appear in the panel into which they were imported.

Bicycle jar file