JDK configuration detailed tutorial


First, the official website to download the JDK: the Oracle official website

Here Insert Picture Description

  • 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:

Here Insert Picture Description

  • Select the Accept License Agreementfollowing, then click the JDK download download prompt box will pop up, as shown below:

Here Insert Picture Description

  • After the download is complete, double-click the executable file to bloggers, for example, double-click jdk-8u121-windows-x64the executable file, you will enter the JDK installation interface:

Here Insert Picture Description

  • As shown above, click on "Next" to enter the following interface:

Here Insert Picture Description

  • One thing to note here, that is the JDK is installed by default in the Cdisk Program Filesdirectory, 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:

Here Insert Picture Description

  • 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:

Here Insert Picture Description

  • As shown above, the display interface JRE being installed, the installation is complete, you will enter the following interface:

Here Insert Picture Description

  • 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_121directory 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:

Here Insert Picture Description

  • As shown above, click on the "Advanced System Settings", enter the following interface:

Here Insert Picture Description

  • 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 value C:\Program Files\Java\jdk1.8.0_121, "OK", and then open the "system variables" area Path, these statements ;%JAVA_HOME%\binappended to the Pathrearmost value of the variable, as shown below:

Here Insert Picture Description


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.

semicolon

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:

Here Insert Picture Description

Re-enter the command javac, the results shown below:

Here Insert Picture Description
Input java -versioncan view the version information:

The results shown above, been able to prove our environment variable configuration Success!

Published 27 original articles · won praise 21 · views 6822

Guess you like

Origin blog.csdn.net/weixin_43941364/article/details/104598460