Import Libraries

Import existing Java libraries to use them in your analytics processors. When you generate the source template for an analytics processor, the code generator automatically adds the import statements for the existing libraries for your application.

  1. Go to your IoT application and select Analytics.
  2. Select Libraries.
  3. Click Create Add Icon next to the Search field.
  4. In the Group ID field, enter an ID that identifies your project.
    Follow the Java naming conventions for packages when creating the name.
  5. In the artifact ID field, enter the name of the jar file without the version.
    The name must use alphanumeric lowercase characters.
    If you’re uploading a third party jar file, use the name specified in the jar file.
  6. In the Version field, enter the version of this jar file.
    Use numbers and dots for the version.
    If you’re uploading a third party jar file, use the version specified in the jar file.
  7. Click the Upload JAR file icon, or drag and drop your file to the Upload JAR file area.
  8. Click Create.

A new row with the library you imported appears in the Libraries table. You can use the imported library from your analytics processor. When you generate the source template for the analytics processor, the import statement for this library are automatically added.

If you add new libraries after generating the source template for the analytics processor, you can manually add the import statements to the source template.

You can filter the list of libraries by entering a full or partial name in the Search field. You can also click the Application toggle button to view only the libraries for the current application.
To delete a library, click the Delete icon Delete Icon for the library you want to delete. Before deleting a library, verify that you aren’t using it from your analytics processor. If you delete a library that is currently used in an analytics processor, you get a a compilation error when trying to deploy the affected analytics processor.