Article Directory
First, the official website to download the JDK: the Oracle official website
- As shown above, download the Oracle JDK in the official website, there is one caveat, and that is before we download the appropriate JDK, you need to click on the marker 1 button is located, select Accept. Otherwise, just click the JDK download time, the following interface will pop up:
- Select the
Accept License Agreement
following, then click the JDK download download prompt box will pop up, as shown below:
- After the download is complete, double-click the executable file to bloggers, for example, double-click
jdk-8u121-windows-x64
the executable file, you will enter the JDK installation interface:
- As shown above, click on "Next" to enter the following interface:
- One thing to note here, that is the JDK is installed by default in the
C
diskProgram Files
directory, if you need to modify the installation path, you can click on the mark 1 "change" as shown, under normal circumstances, you can select the default path, click "Next. ", enter the following interface:
- As shown above, this interface is to install the same version of JRE and JDK, in fact, already included in the JDK JRE, so the JRE does not actually play any role, the installation is no problem here, we have chosen to install, click "Next" to enter the following interface:
- As shown above, the display interface JRE being installed, the installation is complete, you will enter the following interface:
- Content as shown above, if necessary, click on the "Next Steps", will access the tutorials, API documentation and developer guides; otherwise, click "close" can be friends! At this point, the installation JDK done under Win10 systems. Next, configure the environment variable to JDK effect globally. First, find the JDK installation directory to bloggers, for example, this layer into the
C:\Program Files\Java\jdk1.8.0_121
directory and copy for later use. Then, through the "Control Panel" into the "system" attribute, in fact, directly select "This Computer" right click and select "Properties" button:
- As shown above, click on the "Advanced System Settings", enter the following interface:
- Then click on "Environment Variables", enter the following interface:
- From there, select "System Variables" area of the "New" function, click, enter the following interface:
- Set the system variable named
JAVA_HOME
, variable valueC:\Program Files\Java\jdk1.8.0_121
, "OK", and then open the "system variables" areaPath
, these statements;%JAVA_HOME%\bin
appended to thePath
rearmost value of the variable, as shown below:
The most critical areas (see here has been badly configured)
这里有个非常重要的点一定要注意!!!
Is the variable value of the last semicolon is not, and if there be sure to remove, remove the semicolon can choose to edit the text, click OK to exit after the bin, and then re-open the check is not confirmed no semicolon, if the two are not confirmed semicolon, they have won.
Click here to find 编辑文本
:
Make sure that no semicolon after which you can save closed.
Here it is the most error-prone areas, beginners are often here come a cropper.
At this point, the environment variable has been set over! But the empty rumor ah, we then verify, speak with the facts. Thus, open "command line window", enter the command java
, the results shown below:
Re-enter the command javac
, the results shown below:
Input java -version
can view the version information:
The results shown above, been able to prove our environment variable configuration Success!