Configuration of the JDK environment variable:
Right-click computer or My Computer , select Properties -- advanced or Advanced system settings ( Figure 1below)-- environment variable "(see Figure 2below), such as:
Figure 1
Figure 2
Single-Machine "environment variable", which appears as 3 interface,
Figure 3
Then select " New " at " system variable " ( red Mark ), which appears as 4 interface,
Figure 4
The following is a formal configuration section:
(1) Enter "java_home" at " variable name " and enter the JDK installation directory in " Variable Value " (The JRE directory, Bin directory, and Lib directory in the JDK installation directory);
(2) Create a new variable name, classpath, whose variable value is:
.; %java_home%\lib\rt.jar;%java_home%\lib\tools.jar
(3) Double-click the Path variable and add it at the top or last:
%java_home%\bin;
To test whether the JDK was installed successfully:
Select " start " and " run ", or press the combo key "Win + R" directly, enter "cmd" in the Command box, go to the DOS Interface (black box), Enter "java-version" at the command line
Appears as a reminder that the JDK installation was successful.
Configuration of the SDK environment variables:
(1) in " System Variables ", " new ", the variable named "sdk_home", " variable Value " entered the SDK installation directory (the SDK installation directory has the tools directory, Extras directories and Platfroms directories, etc.);
(2) Add the value of the Path variable:
%sdk_home%\tools;
To test if the SDK was installed successfully:
Enter "android-h" in the DOS interface command line,
The prompt message that appears proves that the SDK installation was successful.
Environment variables for configuring JDK and SDK in Android