JDK1.8 detailed download and installation tutorial, configuration of environment variables

Table of contents

1. Download JDK1.8

2. Installation

3. Configure environment variables

Fourth, verify whether the installation and configuration are successful


To download from the official website, you need to register an Oracle account. If you don’t want to register, you can download it through the Baidu network disk :

Please enter the extraction code for Baidu Netdisk

Extraction code: tlpc

After downloading the installation package, you can directly skip to the second step to see the installation process

1. Download JDK1.8

1. Enter the JDK official website to download the installation package, select the x64 version to download, note: generally download the x64 version (if you are not sure, you can go to: Control Panel -> System and Security -> System, check the operating system version, according to the operation of your own computer system version download)

 Enter the official website to download

 2. Check and agree and click to download the installation package

3. To download the installation package, you need to register an Oracle account (in the future, you will also need an Oracle account to download software such as mysql), and you can download the installation package after registering the account

2. Installation

1. After the download is complete, run the installer

2. You can change the installation location by yourself

 3. Click Next and wait for the installation to succeed. At this time, the jre installation window will pop up. Choose the installation path and click Next.

4. The installation is complete

3. Configure environment variables

Right click on "This Computer -> Properties -> Advanced System Settings", select Environment Variables

 Find the system variable, create a new

Variable name: JAVA_HOME
variable value: C:\Program Files\Java\jdk-1.8 (the variable value is the JDK installation path just now)

New again:
variable name: CLASSPATH
variable value: .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar

 

 Configure Path, select the Path variable, and click Edit:

Select New, add these two lines:
%JAVA_HOME%\jre\bin
%JAVA_HOME%\bin

 

Fourth, verify whether the installation and configuration are successful

win + r to open the search bar, enter cmd, click OK, and open the cmd command window:

Enter javac and press Enter, the following command options will appear. If "javac is not an internal or external command" appears, it means that the environment variable configuration is wrong. Check the environment variable configuration again to see if there is a problem.

 Enter java -version and press Enter to view the version information. If the version number appears, the installation is successful

Guess you like

Origin blog.csdn.net/AxyLL/article/details/130556223