Help Center> Image Recognition> SDK Reference> Using Java SDK> Obtaining and Installing the Java SDK
Updated on 2022-12-05 GMT+08:00

Obtaining and Installing the Java SDK

You are advised to use the Java SDK for Image Recognition by installing dependencies through Apache Maven.

  1. Download and install Apache Maven on your operating system.
  2. After installing and configuring Maven, run the mvn -v command. Maven is installed successfully if the following information is displayed.

  3. Add dependencies to an existing Maven project or use an integrated development environment (IDE) to create a Maven project.

    To create a Maven project using IntelliJ IDEA (an example IDE), perform the following steps (skip if you already have a Maven project):

    1. Start IntelliJ IDEA.
    2. Choose File > New > project...
    3. In the displayed New Project dialog box, click Maven and then Next.
    4. Specify GroupId and ArtifactId, and click Next.
    5. Specify Project name and Project location, and click Finish.

  4. Add dependency items to the pom.xml file of the Maven project.

    You can obtain the latest SDK version from the SDK Center.
        <version>3.1.8</version>  ///Replace it with the latest SDK version.

    The following sample code uses the fastjson dependency (ignore and delete it if it is not required):