Skip to main content

Application Integration

This document covers integration of the Datalogic JavaPOS API with an application. This document assumes that Datalogic JavaPOS has already been installed using the provided installer.

Required files

In order to properly utilize Datalogic JavaPOS, a certain number of files must exist in your application's classpath or root directory. These files include configuration files and third-party libraries used by either Datalogic JavaPOS or the OMG JavaPOS reference referred to as JPOS.

Datalogic JavaPOS API

The following library files must appear in the CLASSPATH of your application in order for the Datalogic JavaPOS API to work correctly.

JavaPOS.jar

The JavaPOS.jar file is the main component of the Datalogic JavaPOS API. This file must appear in the CLASSPATH of an application.

DLRFIDLibrary.jar

The DLRFIDLibrary.jar file is the Datalogic JavaPOS RFID extension. This file must appear in the CLASSPATH of an application if Datalogic RFID devices are to be used.

jpos-dls-ext.jar

The jpos-dls-ext.jar file is the Datalogic JPOS Extensions for the Portal Scanner. This file must appear in the CLASSPATH of an application to support Datalogic Portal Scanners.

CMDFW.jar

The CMDFW.jar file is the Datalogic JavaPOS Command-line Firmware update utility. This file must appear in the CLASSPATH of an application to support command-line firmware update using Datalogic JavaPOS.

JavaPOSTest.jar

The JavaPOSTest.jar file is the Datalogic JavaPOS Test application. This file can appear anywhere on the filesystem, and is not required for the operation of the Datalogic JavaPOS API.

Configuration Files

Root Directory

The following configuration files must exist in the root directory of your application. These files will only read from the current working directory of the application. It is best practice to put these files in the folder where your application will be launched from.

brand.properties

The brand.properties file contains branding configuration for the Datalogic JavaPOS API. This file must exist in the current working directory of your application. The location of this file is not configurable.

dls.properties

The dls.properties file contains API-wide configuration settings for the Datalogic JavaPOS API. This file contains the locations of other configuration files and must appear in the current working directory of your application. The location of this file is not configurable.

ECIEncoding.csv

The ECIEncoding.csv file contains configuration settings for Extended Channel Interpretation. The location of this file is configured in the dls.properties file and defaults to the root directory of the application.

IHSParser.csv

The IHSParser.csv file contains configuration settings for parsing Information, Health and Statistics responses from Datalogic devices. The location of this file is configured in the dls.properties file and defaults to the root directory of the application.

LabelIdentifiers.csv

The LabelIdentifiers.csv file contains configuration settings for identifying scanned labels using Datalogic devices. The location of this file is configured in the dls.properties file and defaults to the root directory of the application.

jpos.xml

The jpos.xml file is a file required by the OMG JavaPOS Reference library that is utilized by Datalogic JavaPOS. This xml file contains the device registry for the devices to be recognized by JavaPOS and is required for Datalogic JavaPOS to operate correctly.

CLASSPATH Directory

The following configuration files must exist in the CLASSPATH of your application for Datalogic JavaPOS to operate correctly.

javax.usb.properties (Linux Only)

The javax.usb.properties configuration file is a Linux specific configuration controlling the javax.usb implementation on specific configurations of Linux. The file contains inline documentation and examples.

jpos.properties

The jpos.properties configuration file is part of the OMG JavaPOS reference implementation and controls class loading and properties specific to the JPOS library. The file contains inline documentation and examples.

log4j2.xml

The log4j2.xml configuration file is an XML file containing the logging configuration for Datalogic JavaPOS. The file is a standard Log4j2 configuration file. Datalogic uses a minimal configuration for providing robust logging services via Apache Log4j2 to allow the maximum user customization. Configuration documentation can be found here.

Third-party Libraries

The DataLogic JavaPOS API is dependent on several third-party libraries. These libraries must appear in the CLASSPATH of the application for Datalogic JavaPOS API to work correctly. The installer installs these files to the SupportJars folder within the JavaPOS folder.

Minimal JavaPOS

The following third-party libraries are required for the minimal JavaPOS API functionality.

LibraryVersionNotes
commons-lang33.8.1Apache Commons Library
jcl
jna5.2.0Java Native Access API
jna-platform5.2.0Java Native Access API
jpos1141.14.1OMG JavaPOS Reference 1.14
jpos114-controls1.14.1OMG JavaPOS Reference 1.14
jsr801.0.2JSR-80 Implementation
jsr80_linux1.0.3JSR-80 Implementation (Linux)
jsr80_ri1.0.2JSR-80 Implementation
jsscJava Simple Serial Connector API
log4j22.11.1Apache Log4j2 API
nrjavaserial3.9.3nrjavaserial Serial API
xercesImpl2.12.0Xerces XML API (Part of JPOS)
xml-apis2.12.0Xerces XML API (Part of JPOS)