This topic describes how to add Maven dependencies and download SDK tools to install Alibaba Cloud SDK for Java.
Prerequisites
- The Java environment is installed. Java Development Kit (JDK) version 1.6 or later is used.
- An Alibaba Cloud account is created and an AccessKey pair is created. For more information, see Obtain an AccessKey pair.
Installation methods
- Add Maven dependencies. This method applies to the Java projects that are managed by using Maven.
- Import JAR files to the integrated development environment (IDE). This method applies to the projects that are deployed in Eclipse or IntelliJ IDEA.
Add Maven dependencies
If you use Maven to manage Java projects, you can add Maven dependencies to the pom.xml file to install Alibaba Cloud SDK for Java. In the Maven repository, you can view the Maven dependencies of Alibaba Cloud services.
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.5.22</version>
</dependency>

Import JAR files to the integrated development environment
If you use Eclipse or IntelliJ as the integrated development environment, you can install the Alibaba Cloud SDK for Java by importing the aliyu-java-sdk-core JAR file.
- Eclipse
To install the Alibaba Cloud SDK for Java in Eclipse, perform the following operations:
- Download the aliyun-java-sdk-core.jar file and copy the file to your project folder.
- In Eclipse, open your project, right-click the project, and choose Properties from the shortcut menu.
- In the dialog box that appears, choose to add the downloaded JAR file.
- Click Apply and Close.
- IntelliJ
To install the Alibaba Cloud SDK for Java in IntelliJ, perform the following operations:
- Download the aliyun-java-sdk-core.jar file and copy the file to your project folder.
- In IntelliJ, open your project. In the menu bar, choose .
- Click Apply and then click OK.
After the Alibaba Cloud SDK for Java is installed, you can use OpenAPI Explorer to generate the sample code of API operations for the SDK, and apply the sample code in your projects.