Android Tutorials - Herong's Tutorial Examples - Version 3.03, by Herong Yang
Setting JAVA_HOME Environment Variable
This section provides a tutorial example on how to set up JAVA_HOME environment variable to run development tools to build and test Android apps.
After installing JDK, you need to make sure the JAVA_HOME environment variable is set to the new JDK folder. This is needed to run development tools to build and test Android apps. Here is how you set and verify the JAVA_HOME environment variable.
1. Go to "Control Panel\System and Security\System" and click "Advanced system settings" on the left. You see the System Properties dialog box displayed with the "Advanced" tab opened.
2. Click the "Environment Variables" button. You see the Environment Variables dialog box displayed.
3. Enter or modify the JAVA_HOME entry to be "\Program Files\Java\jdk1.8.0_45\". Then click OK to close dialog boxes.
4. Start command line window and try the following commands:
C:\herong>set JAVA_HOME C:\herong>"%JAVA_HOME%\bin\java" -version java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b15) Java HotSpot(TM) Client VM (build 25.45-b02, mixed mode)
If you get similar output, you know your JAVA_HOME environment variable is correct.
Table of Contents