Super detailed Java installation tutorial, novices come quickly! ! !

JAVA installation package download address: Java Downloads | Oracle (official website address)

What is installed here is jdk1.8 (jdk-8u144-windows-x64)

Baidu network disk link: https://pan.baidu.com/s/1QCyxexofjLpBv7KMFfYuLg 

Extraction code: pso6 

one. General steps for installation

  1. Install JDK
  2. Install JRE

Note: The JDK installation package contains JRE. Once the JDK is installed successfully, the JRE installation interface will automatically pop up.

two. Install JDK

1. Select the corresponding JDK installation file

2. Allow programs to make modifications to the computer

 

3. Go directly to the next step

 

4. After selecting the installation path, next step

 

Note: It is recommended to use the default path. If not, please use the full English path.

5. Wait for the installation to complete

Note: After the installation is complete, you will be prompted to install the JRE interface.

 

 

three. Install JRE

1. Go directly to the next step

 

 

Note: It is recommended to use the default path. If not, please use the full English path.

2. Wait for the installation to complete

 

3. At this point, JDK and JRE are installed.

 

Note: If the installation fails, please go to the " Programs and Control " function in the control panel to uninstall and repeat the above operations.

Four. Configure environment variables

Purpose: The current system can recognize JDK and JRE

1. Right-click My Computer and select Properties -> Advanced System Settings

 

2. Advanced card page->Environment variable configuration

 

3. Add JAVA_HOME variable

 

4. Create a new variable JAVA_HOME under system variables. The variable value points to the folder where the JDK is installed.

                     

 

Note: JAVA _HOME  case and underscore

5. Select Path as shown below and click Edit

             

 

Note: There is usually a Path variable. Do not delete the original content.

6. Edit the Path variable

Note: There is usually a Path variable. Do not delete the original content.

Note: Win10 system recommends moving %JAVA _HOME % \bin to the top

                 

 

7. Finally, confirm the exit step by step.

five. Test whether the JDK environment configuration is successful

1. Press Win key + R key to open Run, enter cmd, and click OK

 

2. Enter java –version  (a space after java) and press Enter. If JDK version information appears, that is, the JDK environment configuration is successful. If java is not an internal command, the configuration fails.

 

3. Enter java c  –version  ( a space after java c ) and press Enter. If JDK version information appears, that is, the JDK environment configuration is successful. If java c is not an internal command, the configuration fails.

 

six. Reason for configuration failure

  1. The variable value of JAVA_HOME is wrong
  2. When editing Path, the value entered for the new variable is incorrect.
  3. After the configuration is completed, the confirmation button is not clicked, but is closed directly.

Note: After modification, it will only take effect if you restart the cmd window.

Guess you like

Origin blog.csdn.net/qq_48988285/article/details/125593715