The installation and configuration of JDK 8 and the resolution of common problems (win10)

1. Installation and configuration of JDK 8

1. Open the http://www.oracle.com webpage and download the appropriate JDK version for the corresponding platform

Insert picture description here

2. Double-click the downloaded exe, such as jdk-8u131-windows-x64.exe

Insert picture description here

3. Enter the installation wizard

Insert picture description here

3. Change the installation path, such as D:\developer_tools\Java\jdk1.8.0_131\ (do not contain Chinese)

Insert picture description here

4. Choose to install all components

Insert picture description here

4. Start the installation

Insert picture description here

5. Install jre, you can change the jre installation path (the process is the same as the above installation directory selection) (Note: jdk already includes jre, but because eclipse needs to identify an independent jre later, some operating systems will report an error)

Insert picture description here

6. Finish the installation

Insert picture description here

Two, configure environment variables

1. Select the desktop "My Computer"-right-click to select properties, select advanced system settings

Insert picture description here

2. Click Environment Variables

Insert picture description here

3. Create a new user variable "JAVA_HOME", the value is the jdk installation path (Note: user variables only affect the current user of this computer, system variables affect all users of this computer, you can configure one of the two)

Insert picture description here

4. Find the user variable path (if you don’t have it, you can create a new one), click Edit, click New "%JAVA_HOME%\bin", and then click OK-OK2. Read in the data

5. Check whether the configuration is successful: enter the command line window through win+R, enter the cmd command,

Input: javac.exe
Insert picture description here
Input: java.exe
Insert picture description here

6. Get the version information of the currently installed jdk

Input: java -version
Insert picture description here

Three, common problems and solutions

I have installed jdk (such as: jdk7), and installed jdk8, which one works?

Solution: It depends on whether the address of the environment variable configuration is 7 or 8 (for example: the address of the environment variable is 7, then 8 does not work)

-------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------- If you have any questions, please contact QQ: 2516183576

Guess you like

Origin blog.csdn.net/xue_yun_xiang/article/details/108767389