Skip to main content
Version: 8.8.x

Install Development Tools

Required

This step is required for team developers and individual developers.

Install the Tools​

Zulu Java​

Self-Managed Commerce requires Azul Zulu OpenJDK™ 21.

  1. Go to the Azul Zulu OpenJDK site.
  2. In the Java Version field, select Java 21 (LTS).
  3. In the Operating System field, select your operating system.
  4. Download and install the installation file.
note

For the exact version of Java that Self-Managed Commerce supports, see Supported Technologies.

Apache Maven​

Apache Maven is the build tool for Self-Managed Commerce.

Maven Compatibility

This version of Self-Managed Commerce requires Maven 3.9.1.

To install Maven on Windows:

  1. Go to Maven distribution.
  2. Download apache-maven-3.9.1-bin.zip.
  3. Extract the file to C:\apache-maven-3.9.1.

To install Maven on Mac or Linux:

  1. Go to Maven distribution.

  2. Download apache-maven-3.9.1-bin.tar.gz.

  3. Create a tools directory in your home folder and extract Maven to it:

    mkdir -p ~/tools && tar -xzf apache-maven-3.9.1-bin.tar.gz -C ~/tools/

Git​

Git is the source control tool for the Self-Managed Commerce source code. Download Git from Git Downloads.

Docker​

You run the local database in a Docker container. Install Docker Desktop or another Docker-compatible container runtime.

Set Environment Variables​

Set these environment variables:

  • JAVA_HOME and JAVA_OPTS for Java.
  • MAVEN_HOME and MAVEN_OPTS for Maven.

Windows​

  1. Open the Start menu, right-click This PC, and select Properties.

  2. Click Advanced System Settings.

    Advanced System Settings link in Windows

    tip

    To open this window from the Windows Run prompt, type SystemPropertiesAdvanced and press Enter.

  3. In System Properties > Advanced, click Environment Variables.

    Environment Variables button in Windows System Properties window

  4. In the Environment Variables window, click New and add these system variables:

    • JAVA_HOME: C:\Program Files\Zulu\zulu-21-amd64
    • JAVA_OPTS: -Xmx2048m -Dsun.lang.ClassLoader.allowArraySyntax=true
    • MAVEN_HOME: C:\apache-maven-3.9.1
    • MAVEN_OPTS: -Xmx4000m -Dsun.lang.ClassLoader.allowArraySyntax=true

    If you installed Java or Maven in a different location, change the values of JAVA_HOME and MAVEN_HOME to match.

  5. Select the Path system variable, and click Edit.

  6. Add these values at the end of the Path variable:

    ;%JAVA_HOME%\bin;%MAVEN_HOME%\bin;

Mac and Linux​

  1. Add these lines to your shell profile. For the zsh shell, use ~/.zshrc. For the Bash shell, use ~/.bash_profile.

    export JAVA_HOME=$(/usr/libexec/java_home -v "21")
    export JAVA_OPTS="-Xmx2048m -Dsun.lang.ClassLoader.allowArraySyntax=true"
    export MAVEN_HOME=~/tools/apache-maven-3.9.1
    export MAVEN_OPTS="-Xmx4000m -Dsun.lang.ClassLoader.allowArraySyntax=true"
    export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
    note

    The /usr/libexec/java_home command exists only on Mac. On Linux, set JAVA_HOME to the Java installation directory.

Make Sure That the Tools Work​

Open a new terminal window and run these commands:

$ java -version
openjdk version "21.0.13.1"
OpenJDK Runtime Environment Zulu21.54+201-CA (build 21.0.13.1+2-LTS)
OpenJDK 64-Bit Server VM Zulu21.54+201-CA (build 21.0.13.1+2-LTS, mixed mode, sharing)

$ mvn -version
Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
Maven home: ~/tools/apache-maven-3.9.1
Java version: 21.0.13.1, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-21.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "26.2", arch: "aarch64", family: "mac"

$ docker --version

The Java version must start with 21 and the Maven version must be 3.9.1.

Optional: Switch Java Versions with jenv​

Optional

This step is for Mac and Linux users who work with more than one version of Self-Managed Commerce.

Different versions of Self-Managed Commerce require Java 8, Java 17, or Java 21. The jenv tool selects the correct Java version for each source code repository. It reads the .java-version file in the repository. If the repository has no .java-version file, jenv uses the global default.

  1. Install jenv.

  2. Add your JDKs to jenv. For example:

    jenv add /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/
    jenv add /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/
    jenv add /Library/Java/JavaVirtualMachines/zulu-21.jdk/Contents/Home/
  3. Enable the jenv plugins:

    jenv enable-plugin maven
    jenv enable-plugin export
  4. Set Java 1.8 as your global default. Older versions of Self-Managed Commerce have no .java-version file and use Java 8.

    jenv global 1.8
  5. Make sure that jenv is configured correctly:

    jenv doctor
    jenv versions