I recently learned about Android development and encountered some problems when I first configured the Java environment. Now I want to share my configuration process:
1. Choose computer> Properties> advanced system Settings> advanced> environment variables.
2. System variable-> New-> variable name: java_home variable value: C: \ Program Files \ Java \ jdk1.7.0 (this is only the installation path of my JDK)
3. Add % java_home % \ bin at the beginning of the variable name path. (If a path item already exists, you do not need to create a new one, add directly to the backend, but use it; separate it from the existing items)
4. Modify the value of the classpath variable:
Add % java_home % \ Lib; % java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. jar;
Finally, test whether the environment variables are set successfully.
In the lower-left search box, type
CMD press ENTER
Enter javac
If the following
This indicates that the Java environment variable is successfully configured!
If
'Javac' is not an internal or external command or can be run.ProgramOr batch files.
This error indicates that the Java environment variable configuration has failed. Check it carefully!