Reprinted from: http://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.html
Install JDK two installation prompts appear during installation of the installation directory. The first time is to install the JDK, and the second is to install the JRE. It is recommended that all two are installed in a different folder in the same Java folder. (cannot be installed in the Java folder root directory, JDK and JRE installed in the same folder will be error)
As shown
Steps to read
- 2
1: Install JDK optional directory simply change the directory before the default installation directory \java
2: Install jre→ change →\java before directory and install JDK directory
Note: If no installation directory is required, all default settings are available. No need to make any changes, two times directly point to the next step.
steps to read steps to read
- 3
Configure environment variables after installing JDK computer → properties → advanced system settings → advanced → environment variables
Steps to read
- 4
System variables → new java_home variable.
Variable value fill in the JDK installation directory (I am E:\Java\jdk1.7.0)
- 5
System variables → find Path variable → edit
Enter%java_home%\bin;%java_home%\jre\bin at the end of the variable value;
(Note that the original path of the variable value at the end of there is no; number, if not, first enter; number and then enter the above code)
Steps to read
- 6
System variables → new CLASSPATH variable
Variable values are filled in.; %java_home%\lib;%java_home%\lib\tools.jar (Note that there is a point in the front)
System Variable Configuration complete
Steps to read
- 7
Verify that the configuration is running successfully cmd input java-version (there are spaces between Java and-version)
If the version information is displayed, the installation and configuration are successful.
JDK environment variable Configuration