3.1. Introduction

MicroEJ defines two kinds of libraries: the foundation libraries and the add-on libraries. These libraries are available via one or several repositories (online or offline).

3.1.1. Foundation Library

A foundation library is a MicroEJ platform built-in library. It is composed of two sub libraries: the API and the implementation. The implementation requires some platform features and the implementation version is fixed by the platform. The implementation may be different from a platform to another. For instance it can require some platform advanced features (like a GPU). The source code of the implementation is often hidden. Only the APIs are visible: some implementation methods and fields (public or private) are not accessible.

The application cannot directly depend on the implementation of a foundation library. It depends on the API of the foundation library:

<dependency org="ej.api" name="edc" rev="1.3.2"/>

At application compile time, the MicroEJ workbench checks if the platform implements the foundation library. If not, an error is raised. If the application tries to use a foundation library whose version is higher than the implementation version available in the platform, a warning is raised and some compilation issues can occur.

Several foundation libraries are provided by MicroEJ: EDC, BON etc. A platform can add its own foundation libraries, like VGLite or VGFont libraries.

3.1.2. Add-on Library

An add-on library is an additional library which requires, at least, the foundation library EDC. This library should not depend on platform features: it is designed to run on every platform. Its code is open-source and by consequence all internal methods and fields (public and private) are visible.

The application directly depends on an add-on library:

<dependency org="ej.library.ui" name="widget" rev="3.1.0"/>

At application compile time, the MicroEJ workbench adds the add-on library in the application classpath.

Several foundation libraries are provided by MicroEJ: MWT, widget etc. A platform does not add its own add-on libraries, this is the application which fetches the add-on libraries.

3.1.3. MicroEJ Central Repository

The MicroEJ Central Repository shares all MicroEJ foundation libraries (only the APIs: EDC, BON etc.) and several add-on libraries (MWT, widget , etc.). This repository is automatically known by the MicroEJ Studio/SDK workspace. The repository is available here: https://developer.microej.com/central-repository/.

3.1.4. Additional Repository

For a dedicated development, an additional repository can be available. This repository can be offline or partial.

  • An offline repository is useful to be MicroEJ Central Repository independant. However, a part or all MicroEJ Central Repository is deployed in the offline repository. It is a snapshot of the MicroEJ Central Repository at a given time. In addition with MicroEJ Central Repository libraries, some additional libraries (foundation or add-on) can be available.
  • A partial repository is used to deploy some libraries (foundation or add-on) which are not yet available in the MicroEJ Central Repository. This is useful in advanced phase. This repository does not contain the libraries already available in MicroEJ Central Repository: it makes a link on the online repository and adds some new libraries.