Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Configuring System Environment Variables

Configuring System Environment Variables

Set the Java, Maven, and MySQL system environment variables following the instructions below.

  1. Open the Start menu, right-click Computer and select Properties.
  2. Click Advanced System Settings, located at the left side of the System window.

    Ev2.png

  3. In the System Properties window, click Environment Variables to display the Environment Variables window.

    Ev4.png

  4. Click New... to add a new System Environment variable.
  5. Add the System Environment variables and values shown in the table below:
    Variable Name Variable Value

    JAVA_HOME

    C:\Program Files\Java\jdk1.8.0_144

    JAVA_OPTS

    -Xmx1024m -Dsun.lang.ClassLoader.allowArraySyntax=true

    MAVEN_HOME

    C:\apache-maven-3.3.9

    MAVEN_OPTS

    -Xmx2048m -XX:ReservedCodeCacheSize=128m -Dsun.lang.ClassLoader.allowArraySyntax=true

    MYSQL_HOME C:\MySQL\MySQL Server 5.7
    Note:

    The values you set for JAVA_HOME, MAVEN_HOME, and MYSQL_HOME depend on where you installed Java, Maven, and MySQL, which may differ from where we recommend they are installed.

  6. Select the Path system variable, and click Edit...
  7. Append the values below to the end of the Path variable value:
    ;%JAVA_HOME%\bin;%MAVEN_HOME%\bin;%MYSQL_HOME%\bin;
    
Tip: Linux Tip

To set the system variables on Linux, modify your .bash_profile in your home folder. An example of this is shown below:

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
JAVA_HOME=/home/USERNAME/tools/jdk1.8.0_144
export JAVA_HOME
JAVA_OPTS='-Xmx1024m -Dsun.lang.ClassLoader.allowArraySyntax=true'
export JAVA_OPTS
MAVEN_HOME=/home/USERNAME/tools/apache-maven-3.3.9
export MAVEN_HOME
MAVEN_OPTS='-Xmx2048m -XX:ReservedCodeCacheSize=128m -Dsun.lang.ClassLoader.allowArraySyntax=true'
export MAVEN_OPTS
PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
export PATH

Do not copy/paste the example above—this is just an example.