Installation

This chapter will guide you through the installation process of the SDK on your workstation. First check the System Requirements before proceeding.

System Requirements

  • Hardware
    • Intel x64 (Dual-core i5 minimum) or macOS AArch64 (M1) processor

    • 4GB RAM (minimum)

    • 16GB Disk (minimum)

  • Operating Systems
    • Windows 11 or Windows 10

    • Linux distributions (tested on Ubuntu 20.04 and 22.04)

    • macOS x86_64 with Intel chip

    • macOS aarch64 with M1 chip

  • Java Runtime Environment
    • JDK 11 or higher LTS version (11, 17 or 21) - Eclipse Temurin or Oracle Distributions

Check your JDK version

The SDK requires a JDK 11 or a higher LTS version to be installed and:

  • The JAVA_HOME environment variable set to the path of a JDK.

OR

  • The java executable of a JDK available in the PATH.

If the JAVA_HOME is set to a JDK, make sure that it is a JDK 11 or a higher LTS version.

If the JAVA_HOME is not set, make sure a JDK executable is available in the PATH environment variable. To check, run java -version in a terminal:

$ java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)

If you don’t have a JDK installed, you can download and install one from Adoptium or Oracle.

Configure Repositories

In order to use the SDK Gradle plugins and modules in your project, the Central and Developer repositories must be configured. There are several ways to declare repositories. To get started, you can declare them globally to make them available in all your projects:

  • Create the folder <user.home>/.gradle/init.d if it does not exist.

  • Download and copy this file in the previously created folder.

At this stage, you can already build a project from the command line, for example, by executing the command ./gradlew build at the root of the project. But let’s continue the installation process to have a complete development environment.

Note

This configuration makes MicroEJ Central and Developer repositories available to every project. If you have several repositories configuration specific to certain projects, you can refer to multiple repository configuration how-to

SDK EULA Acceptation

The use of MICROEJ SDK 6 requires to accept the SDK EULA.

The acceptance can be done at the project level or system-wide. For a system-wide acceptance, we recommend to define the accept-microej-sdk-eula-v3-1c system property in a gradle.properties file in your Gradle User Home folder $USER_HOME/.gradle/gradle.properties:

systemProp.accept-microej-sdk-eula-v3-1c=YES

Refer to SDK EULA Acceptation section of Licenses to get more information about SDK EULA, and alternative configurations.

Install the IDE

Using an IDE is highly recommended for developing MicroEJ projects, making the development more comfortable and increasing productivity. The following IDEs are supported:

Follow their respective documentation to install one of them.

Install the IDE Plugins

Once your favorite IDE is installed, plugins must be installed to develop MicroEJ Applications.

Follow these steps to install the latest stable version of the MicroEJ plugin for Android Studio:

  • In Android Studio, open the Settings window (menu File > Settings… on Windows and Linux, menu Android Studio > Settings… on macOS).

  • Go to Plugins menu.

  • In the search field, type MicroEJ for Android Studio:

Android Studio Installation

Android Studio Plugin Installation

  • Click on the Install button.

  • In the upcoming Third-Party Plugins Notice window, click on the Accept button.

    Android Studio Plugin Installation - Third-Party Plugins Notice

    Android Studio Plugin Installation - Third-Party Plugins Notice

  • Click on the Restart IDE button.

Warning

There used to be a unique plugin for both Android Studio and IntelliJ IDEA. Each IDE now has its own dedicated plugin, so if the IntelliJ IDEA MicroEJ plugin has been previously installed, you should uninstall it and install MicroEJ for Android Studio instead.