Install Development Tools
This step is required for team developers and individual developers.
Install the Tools
Zulu Java
Self-Managed Commerce requires Azul Zulu OpenJDK™ 21.
- Go to the Azul Zulu OpenJDK site.
- In the Java Version field, select
Java 21 (LTS). - In the Operating System field, select your operating system.
- Download and install the installation file.
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.
This version of Self-Managed Commerce requires Maven 3.9.1.
To install Maven on Windows:
- Go to Maven distribution.
- Download
apache-maven-3.9.1-bin.zip. - Extract the file to
C:\apache-maven-3.9.1.
To install Maven on Mac or Linux:
-
Go to Maven distribution.
-
Download
apache-maven-3.9.1-bin.tar.gz. -
Create a
toolsdirectory 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_HOMEandJAVA_OPTSfor Java.MAVEN_HOMEandMAVEN_OPTSfor Maven.
Windows
-
Open the Start menu, right-click This PC, and select Properties.
-
Click Advanced System Settings.
tipTo open this window from the Windows Run prompt, type
SystemPropertiesAdvancedand press Enter. -
In System Properties > Advanced, click Environment Variables.

-
In the Environment Variables window, click New and add these system variables:
JAVA_HOME:C:\Program Files\Zulu\zulu-21-amd64JAVA_OPTS:-Xmx2048m -Dsun.lang.ClassLoader.allowArraySyntax=trueMAVEN_HOME:C:\apache-maven-3.9.1MAVEN_OPTS:-Xmx4000m -Dsun.lang.ClassLoader.allowArraySyntax=true
If you installed Java or Maven in a different location, change the values of
JAVA_HOMEandMAVEN_HOMEto match. -
Select the
Pathsystem variable, and click Edit. -
Add these values at the end of the
Pathvariable:;%JAVA_HOME%\bin;%MAVEN_HOME%\bin;
Mac and Linux
-
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.1export MAVEN_OPTS="-Xmx4000m -Dsun.lang.ClassLoader.allowArraySyntax=true"export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/binnoteThe
/usr/libexec/java_homecommand exists only on Mac. On Linux, setJAVA_HOMEto 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
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.
-
Install jenv.
-
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/ -
Enable the
jenvplugins:jenv enable-plugin mavenjenv enable-plugin export -
Set Java 1.8 as your global default. Older versions of Self-Managed Commerce have no
.java-versionfile and use Java 8.jenv global 1.8 -
Make sure that
jenvis configured correctly:jenv doctorjenv versions