Install the Java SDK

Updated at:

You can install the Alibaba Cloud Java SDK by adding a Maven dependency or by downloading the SDK package.

Prerequisites

Before you install and use the Alibaba Cloud Java SDK, make sure that you meet the following requirements:

  • You can install the Java environment.

Note

The Alibaba Cloud Java SDK requires JDK 1.6 or later. To check the version of your Java runtime environment, open the command line and run the java -version command.

  • You have an Alibaba Cloud account and have created an AccessKey pair. For more information, see AccessKey.

  • You have the Java SDK core library installed.

Java SDK installation methods

You can install the Java SDK using one of the following methods:

  • Add a Maven dependency. This is the recommended method for Maven-managed Java projects.

  • Import JAR files in an integrated development environment (IDE). Use this method for projects that use an IDE such as Eclipse or IntelliJ.

1. Add a Maven dependency (recommended)

To install the Alibaba Cloud Java SDK, add a Maven dependency to the pom.xml file. The Maven dependency information for each cloud product is available in the Maven repository.

Add the following dependency to install the Java SDK core library for Cloud Video.

<dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-core</artifactId>
    <version>4.5.3</version>
</dependency>
<dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-aliyuncvc</artifactId>
    <version>Click the SDK link to find and use the latest version</version>
</dependency>
Important

The version number in the preceding example is for reference only. For the latest version, see Latest version number.

2. Import JAR files in an integrated development environment

If you use an IDE such as Eclipse or IntelliJ, you can install the Alibaba Cloud Java SDK by importing the aliyun-java-sdk-core and aliyun-java-sdk-aliyuncvc JAR files.

  • Eclipse

Follow these steps to install the Alibaba Cloud Java SDK in your Eclipse project:

  1. Copy the downloaded aliyun-java-sdk-core and aliyun-java-sdk-aliyuncvc files to your project folder.

  2. Open your project in Eclipse, right-click the project, and then click Properties.

  3. In the dialog box that appears, click Java Build Path > Libraries > Add JARs to add the downloaded JAR files.

  4. Click Apply and Close.

  • IntelliJ

Follow these steps to install the Alibaba Cloud Java SDK in your IntelliJ project:

  1. Copy the downloaded aliyun-java-sdk-core and aliyun-java-sdk-aliyuncvc files to your project folder.

  2. Open your project in IntelliJ and click File > Project Structure in the menu bar.

  3. Click Apply, and then click OK.

Other SDK GitHub addresses

Go SDK

C++ SDK

PHP SDK