Updated on 2024-05-09 GMT+08:00

JDK Installation

The MPC SDK uses JDK 8 or later. The following uses JDK 8 (Windows x64) running on Windows 7 as an example. If you have downloaded the JDK and configured the environment, skip this section.

Procedure

  1. Download the JDK file from the official website. JDK 8 is used as an example. Click DOWNLOAD below JDK.

  2. After the JDK file is downloaded, install the JDK as prompted. For example, install the JDK to the C:\Program Files\Java\jdk1.8.0_131 directory on the local PC.
  3. Configure Java environment variables.

    1. Right-click Computer, choose Properties > Advanced system settings.
    2. Click the Advanced tab, and then click Environment Variables.
    3. Set JAVA_HOME, PATH, and CLASSPATH (case-insensitive) in the System variables area. See Table 1.

      If the three variables already exist, click Edit. If not, click New.

      Table 1 JAVA environment variables

      Variable

      Value

      Description

      JAVA_HOME

      JDK installation path

      Example: C:\Program Files (x86)\Java\jdk1.8.0_1311

      PATH

      %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin

      Add it to the end of the original PATH value.

      CLASSPATH

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

      There is a dot (.) in front of the value.

  4. Open the CLI and run java -version. The Java environment variables have been configured if the Java version is displayed.

    The following is a successful response example: