Environment variable Windows

Posted on 22 Jan 2016Posted by mCardenas

Unfortunately, the installation of JDK, Maven or Ant is not defined in our machine the relevant variables for each application (JAVA_HOME, ANT_HOME and M2_HOME). Therefore these variables will need to be created manually.

After installing all components (Java, Ant, Maven and Android), set environment variables in your machine.

In the “System Properties” window, “Advanced Options” tab and “Environment Variables” option will create the necessary variables for the above components: Java Ant, Maven and Android.

Set environment variable Windows

Set environment variable Windows

JAVA_HOME

  • Variable name “JAVA_HOME” and as the value of the same “C:\java\Jdk1.7.0_79” Set environment variable JAVA_HOME

ANT_HOME

  • Variable name “ANT_HOME” and as the value of the same “C:\apache-ant-1.9.6” Set environment variable ANT_HOME

MAVEN_HOME

  • Variable name “M2_HOME” and as the value of the same “C:\apache-maven.3.3.9” Set environment variable M2_HOME

ADD to PATH - Add binaries to environment variable PATH. The following text string to add to the end of the content of the variable PATH: “;%JAVA_HOME%\bin;%M2_HOME%\bin;%ANT_HOME%\bin”.

Edit environment variable PATH

Set environment variable M2_HOME

ANDROID_HOME

  • Set environment variable ANDROID_HOME to the path of your installed Android SDK and add $ANDROID_HOME/tools as well as $ANDROID_HOME/platform-tools to your $PATH. (or on Windows %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools).

Set environment variable ANDROID_HOME

ANDROID_HOME to PATH - Add binaries to environment variable PATH. The following text string to add to the end of the content of the variable PATH: “;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform_tools”.

Set environment variable ANDROID_HOME to PATH

WarningWarning: Do not delete the contents of the PATH variable, just add the new text string.