JDK11 download and installation, environment configuration (the most detailed on the entire network, worth collecting)

Table of contents

1. Download JDK11

2. Install JDK11

3. Configure environment variables

4. Verify whether the environment configuration is successful

5. Answer: why not configure CLASSPATH?

What is JDK

JDK is  a Java  language software development toolkit , mainly used for Java applications on mobile devices and embedded devices . JDK is the core of the entire Java development. It includes the JAVA running environment ( JVM + Java system class library ) and JAVA tools.

1. Download JDK11

   (1) First check whether it has been installed. Enter cmd using the Win+R keys to enter the Windows console , and then enter:

 java -version   or  javac ,   "Not recognized as an internal or external command, operable program or batch file ."

  Description is not installed.

 

   (2) Go to   Java Downloads | Oracle and download jdk from the official website: Java Downloads | Oracle   . You need to register an Oracle account. This article will provide the installation package . The JDK11 download address is placed in the comment area .

2. Install JDK11

(1) Double-click to open the downloaded file and click Next.

 

 (2) Select the installation path. You can go to the next step by default or place it in a custom directory folder.

 (3), I put it here: D:\JDK11 (remember the path here, you need to use it to configure the environment)

 (4) After the installation is complete, just close the interface.

 

3. Configure environment variables

 (1) Right-click My Computer > Properties > Advanced System Settings > Environment Variables

 

 

  (2) New variable name:   JAVA_HOME      variable value: D:\JDK11      

   (ps: The variable value is the installation address of the JDK just now)

 (It is mentioned here that it is recommended to use the following  system variables  )

 

(3) After filling in, confirm

 (4) Slide the scroll bar next to it, find Path click Edit and add the JAVA_HOME   variable just now

 (5), click  New

 

 (6). Enter:  %JAVA_HOME%\bin

 

(PS: The environment configuration has been completed here) 

4. Verify whether the environment configuration is successful

  (1) Open the console: Win+R keys and enter cmd to enter the Windows console

 

  (2) Enter the command: java -version   or  javac

(3) Obtaining jdk version information indicates that the environment configuration is successful .  

5. Answer: why not configure  CLASSPATH ?

    Some online tutorials configure  CLASSPATH. Here are the version descriptions.

(1) Starting from jdk9 , there is no longer a jre nested directory under the JDK version directory. No configuration is required and it can be used normally.

(2. The CLASSPATH environment variable must be configured only when the old version of JDK is 1.5 or earlier . The use of jdk11 here does not require configuration and can be used normally.

 

 


Dear readers, please give me a like, thank you! ! !

Guess you like

Origin blog.csdn.net/lin857/article/details/130259319