This topic describes how to install Elastic Compute Service (ECS) SDK for Java and
the Alibaba Cloud SDK core library.
Prerequisites
JDK 1.6 or later is installed.
Background information
The Alibaba Cloud Developer Center provides ECS SDK for Java, and Maven project dependencies
and JAR packages of the Alibaba Cloud SDK core library. You can write code to call
Alibaba Cloud SDKs to access Alibaba Cloud products and services.
In this example, the Windows 10 64-bit operating system and the IntelliJ IDEA Java
development tool are used.
Procedure
- Use one of the following methods to configure the Maven project management tool in
IDEA:
- Use the integrated Maven project management tool in IDEA.
- Download the Maven software corresponding to the operating system from the official
Maven website (Download Apache Maven) and manually configure the Maven tool.
- Go to Alibaba Cloud SDKs to obtain the Alibaba Cloud SDK core library and Maven dependencies of ECS.
- Create a Maven project by using one of the following methods:
- Method 1: Create a Maven project in IDEA.

- Method 2: Convert an existing project into a Maven project.
- Right-click the project to be converted and select Add Framework Support....

- Select Maven and click OK.

- Add the aliyun-java-sdk-core, aliyun-java-sdk-ecs, and fastjson dependencies to the
pom.xml file in the project directory.
After the dependencies are added, the Maven project management tool automatically
downloads the corresponding JAR packages.
Note SDK packages are frequently updated. We recommend that you obtain the latest version
of dependencies from the official Alibaba Cloud SDKs website.
<dependencies>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.5.6</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-ecs</artifactId>
<version>4.19.9</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.83</version>
</dependency>
</dependencies>