All Products
Search
Document Center

ApsaraVideo VOD:Installation

Last Updated:Apr 11, 2024

This topic describes how to install the server SDK for Java and provides sample code.

Prerequisites

JDK 6 or later is installed.

Install the server SDK for Java

Note
  • This topic describes how to install the ApsaraVideo VOD SDK for Java V1.0. To install the ApsaraVideo VOD SDK for Java V2.0, see the installation guide in Alibaba Cloud OpenAPI Explorer. For more information, see Quick Start.

  • You must install the SDK core library and ApsaraVideo VOD library. For more information, see SDK overview and download. We recommend that you download the latest version.

  • You must install the core library aliyun-java-sdk-core V4.4.5 or later.

  • You must install the ApsaraVideo VOD library aliyun-java-sdk-vod. If new API operations or new features of existing API operations are unavailable in the current version of the SDK, update the SDK to the latest version. For more information about the versions and release notes, see ApsaraVideo VOD. On the ApsaraVideo VOD page, select an SDK version from the drop-down list and click View release report in the Actions column to view the release details.

  • If you want to use the HTTP Live Streaming (HLS) encryption feature in ApsaraVideo VOD SDK for Java V2.16.9 or earlier, you must add the aliyun-java-sdk-kms dependency required for Key Management Service (KMS) to your project. This dependency is not required in other scenarios.

  • The version numbers included in the following sample code are for reference only. Replace the version numbers based on your business requirements.

Add JAR file dependencies:

<dependency>
  <groupId>com.aliyun</groupId>
  <artifactId>aliyun-java-sdk-core</artifactId>
  <version>4.6.0</version>
</dependency>
<dependency>
  <groupId>com.aliyun</groupId>
  <artifactId>aliyun-java-sdk-vod</artifactId>
  <version>2.16.10</version>
</dependency>
<dependency>
  <groupId>com.alibaba</groupId>
  <artifactId>fastjson</artifactId>
  <version>1.2.83</version>
</dependency>
<dependency>
  <groupId>com.aliyun</groupId>
  <artifactId>aliyun-java-sdk-kms</artifactId>
  <version>2.10.1</version>
</dependency>