Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Download and install JDK

Shulou Source: shulou.com Published: 2022-06-03 06:18:49 11月23日 Update

At present, the premise of the installation and use of many tools is to install JDK, so simply write down the installation process of JDK here, so it is convenient for yourself to forget and look it up. I hope it can also be helpful to others.

First of all, living in their own is also a rookie, the various understanding and use of JDK is not very clear, directly on the installation steps.

Download the jdk address

Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

After entering the address, select the jdk package that matches your computer and download it. Mine is from the win7 64-bit system.

Second, install JDK

1. Find the downloaded JDK location and double-click the JDK application

3. Click "next".

4. You can modify the installation path. I will change the installation path to the Java directory on disk D, and then click "next"

5. Modify the installation directory again, and note that jre must be installed in the same directory as jdk Java, but not in the jdk folder, because some programs in jdk will be replaced and make errors (there is no difference in the case of the folder name under windows, so Java is the java folder), click "next"

6. Click "close" when the installation is complete.

Configure the environment of JDK

1. Right-click the "computer" icon on the desktop, click "Properties" in the drop-down menu that appears, enter the interface below, and click "Advanced system Settings"-- "Advanced"-- "Environment variables".

2. Under system variables, click * * New * * to create a new environment variable.

A. New JAVA_HOME

Variable name: JAVA_HOME

Variable value: fill in the installation path of JDK here (the installation path I just had is D:\ java\ jdk1.8.0_60)

B. New CLASSPATH

Variable name: CLASSPATH

Variable value:.;% JAVA_HOME%\ lib\ dt.jar;%JAVA_HOME%\ lib\ tools.jar; (this is a fixed value, note that there is a dot at the beginning and a semicolon at the end, don't miss it)

C. Edit the Path variable (this variable is usually included in the system variable, so you just need to edit it)

Variable name: Path

Variable value:% JAVA_HOME%\ bin;%JAVA_HOME%\ jre\ bin; (add this fixed value after the original variable value, note that the semicolon at the end is not omitted)

4. Check whether JDK is installed successfully

Enter java-version in the DOS command line interface of windows. When the jdk version appears, the installation is successful.

Note:

When multiple users are used in the system, the environment variable is set in individual user variables, indicating that only the user is available (when setting the value of PATH, it is possible to copy the path value in the system variable first, and then add the variable value to be set. The available% PATH% is equivalent to taking the path value in the system variable), and setting the environment variable in the system variable means that all users are available.

Tags: Variable system value environment user path file folder directory advanced success semicolon interface program clear below use location again premise Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Linux Docker Shulou Information Xiaomi