Download the SDK
http://tools.android-studio.org/index.php/sdk
Configure environment variables
Variable name: ANDROID_HOME Variable value: D:\android-sdk-windows (sdk installation directory)
Variable name: Path
Variable value: %ANDROID_HOME%\tools
Variable value: %ANDROID_HOME%\platform-tools
test
cmd executes the command java -version