Java JDK download and install environment variable configuration

Table of contents

1. Download and install

1 Introduction

2. JDK download JDK official website overseas historical address:

3. Install

 2. Environment variable configuration

1. Create a new JAVA_HOME variable

2. PATH variable

3. CLASSPATH variable

4. Test whether the installation is successful

1. Download and install

1 Introduction

JDK is a set of Java language software development kit provided by SUN, referred to as JDK (JavaDevelopmentKit). JDK is the core of the entire Java development, including the Java runtime environment, Java basic class library and Java tools.

Currently, JDK has three long-term support versions (LTS), namely: JDK8 , JDK11  and  JDK17

When we develop Java daily, JDK is essential. When we download java SE jdk, we usually go to the official website of Oracle to download, but Oracle’s official download conditions are very strict, and we need to manually agree to the license, historical version You need to log in to download, so sometimes you have to register first, which is very cumbersome. What's more troublesome is that the download address is abroad, and the download speed is very slow, so we can choose some domestic mirrors to download Oracle's jdk, and the speed will be much faster

2. JDK download
JDK official website overseas historical address:

Java Archive | Oracle
JDK official website domestic download address:
Java Downloads | Oracle China

Huawei JDK mirror address:

Index of java-local/jdk

Programming treasure house jdk mirror address:

JDK Download - Codebaoku (codebaoku.com)

Alibaba jdk mirror address:

Dragon Well (dragonwell-jdk.io)

3. Install

Download the .exe file and go to the next step directly. The default installation path is: C:\Program Files\Java

 2. Environment variable configuration

My Computer----Right-click Properties---Advanced System Settings---Environment Variables

1. Create a new JAVA_HOME variable

System Variables --- New System Variables --- Fill in the data --- Click OK

variable name:

JAVA_HOME

Variable value (your local JDK installation path)

Example (default path):

C:\Program Files\Java\JDK版本

2. PATH variable

Generally there are two situations

%JAVA_HOME%\bin

%JAVA_HOME%\jre\bin

①System Variables---Double-click the PATH variable---Add---Paste Value---Confirm

②System variables --- double-click the PATH variable --- input variable value --- use a semicolon for each input   ; separate (English semicolon) --- OK

3. CLASSPATH variable

System Variables --- New System Variables --- Fill in the data --- Click OK

variable name:

CLASSPATH

variable:

.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar

4. Test whether the installation is successful

win+R enter cmd to open the CMD command window---enter code

code:

java -version

 The corresponding version number appears to indicate that the installation is successful

Guess you like

Origin blog.csdn.net/qq_55917018/article/details/130418974