This topic describes how to install and update the server operation SDK for Java and provides sample code.
Environment requirements
Java Development Kit (JDK) 6 or later is installed.
Install the SDK
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.5</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.62</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-kms</artifactId>
<version>2.10.1</version>
</dependency>
Note
- The version of
aliyun-java-sdk-core
is V4.4.5 or later. - For more information about the latest version of
aliyun-java-sdk-vod
, see theVersion
column of the first table in Release notes of server operation SDKs. aliyun-java-sdk-kms
is a dependency that is required to use Key Management Service (KMS). If KMS is not used, you do not need to add this dependency.