Help Center> Image Recognition> SDK Reference> Using Java SDK> Preparing a Java Development Environment
Updated on 2022-02-22 GMT+08:00

Preparing a Java Development Environment

Image Java SDK uses Java SE Development Kit 8 (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.

  1. Download the JDK file.
  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. Right-click Computer, choose Properties > Advanced System Settings > Environment Variables, and perform the following operations to configure Java environment variables:

    1. Create system variable JAVA_HOME whose value is the JDK installation path.
    2. Add %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin to Path. Separate multiple values with semicolons (;).
    3. Create system variable CLASSPATH whose value is %JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar.

  4. Open the command line interface (CLI) and run java -version. If the information shown in Figure 1 is displayed, the configuration is successful.

    Figure 1 Java version information