Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This site 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

Use this procedure to set the Java, Maven, and MySQL system environment variables.

  1. Open the Start menu, right-click Computer and select Properties.
  2. Click Advanced System Settings.

    Ev2.png

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

    Ev4.png

  4. To add a new system environment variable, on the Environment Variables window, click New.
  5. Add the following:
    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.5.2

    MAVEN_OPTS

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

    MYSQL_HOME C:\MySQL\MySQL Server 5.7
    Note:

    The values for JAVA_HOME, MAVEN_HOME, and MYSQL_HOME variables depend on the location where Java, Maven, and MySQL are installed. This location might differ from the default values provided.

  6. Select the Path system variable, and click Edit.
  7. Add the following variables at the end of the Path variable:
    1. ;%JAVA_HOME%\bin;%MAVEN_HOME%\bin;%MYSQL_HOME%\bin;

    Copy

Tip: Linux Tip

To set the system variables on Linux, modify your .bash_profile in your home folder.

Example
  1. # .bash_profile
  2. # Get the aliases and functions
  3. if [ -f ~/.bashrc ]; then
  4. . ~/.bashrc
  5. fi
  6. # User specific environment and startup programs
  7. PATH=$PATH:$HOME/bin
  8. export PATH
  9. JAVA_HOME=/home/USERNAME/tools/jdk1.8.0_144
  10. export JAVA_HOME
  11. JAVA_OPTS='-Xmx1024m -Dsun.lang.ClassLoader.allowArraySyntax=true'
  12. export JAVA_OPTS
  13. MAVEN_HOME=/home/USERNAME/tools/apache-maven-3.5.2
  14. export MAVEN_HOME
  15. MAVEN_OPTS='-Xmx2048m -XX:ReservedCodeCacheSize=128m -Dsun.lang.ClassLoader.allowArraySyntax=true'

Copy

...
Read more