Install the JDK on Windows

更新时间:
复制 MD 格式

This topic explains how to install the Java Development Kit (JDK) on Windows.

Why install the JDK

The Java Development Kit (JDK) is a software development kit for creating Java applications. As a key component of the Java development environment, it provides the core features to compile, run, and access Java standard libraries.

Procedure

  1. Go to the Oracle website. In the top navigation bar, choose Products > Java.

  2. In the upper-right corner, click Download Java.

  3. Click the Java archive tab.

  4. Select the JDK version to download. The Alibaba Cloud SDK runtime environment requires JDK 8 or later. In this example, click Java SE 8 (8u211 and later).

  5. Select the Windows x64 Installer for your operating system, and click jdk-8u401-windows-x64.exe to download the file.

    Important

    You must sign in with an Oracle account to download the JDK. If you do not have an account, you can create one for free.

  6. Double-click the downloaded JDK installer (jdk-8u401-windows-x64.exe) and follow the installation wizard to complete the installation.

    Important

    If the JDK is already installed, skip this step. To reinstall, first uninstall the existing version.

  7. Verify the installation in Command Prompt.

    Press Win + R to open the Run dialog box, type cmd, and then press Enter to open Command Prompt. Run the java -version command. A successful installation returns output similar to the following:

    C:\xxx>java -version
    java version "1.8.0_401"
    Java(TM) SE Runtime Environment (build 1.8.0_401-b10)
    Java HotSpot(TM) 64-Bit Server VM (build 25.401-b10, mixed mode)