This topic describes how to install ECS SDK for Java and the Alibaba Cloud SDK core
library.
Prerequisites
JDK 1.6 or later must be installed before you install ECS SDK for Java.
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.
This example uses Windows 10 64-bit as the operating system and uses IntelliJ IDEA
as the Java development tool.
Procedure
- Choose one of the following ways 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 to a Maven project.
- Right-click the project to be converted and choose Add Framework Support... from the shortcut menu.

- Select Maven and click OK.

- Add the aliyun-java-sdk-core, aliyun-java-sdk-ecs, and fastjson dependencies to the
pom.xml file under the project directory.
After the dependencies are added, the Maven project management tool automatically
downloads the corresponding JAR packages.
<dependencies>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.4.3</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-ecs</artifactId>
<version>4.17.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.60</version>
</dependency>
</dependencies>
- Check External Libraries under the project directory.
If the output in the following figure is generated, the dependencies are imported.
