Before you use SDK for Java to send and subscribe to messages, perform the steps in this topic to prepare the environment.
Environment requirements
- JDK 1.6 or later is installed. For more information, visit Java SE Downloads.
- Maven is installed. For more information, visit Download Apache Maven.
Install SDK for Java
Import dependencies by using Maven and add the following dependency to the pom.xml file:
<dependency>
<groupId>com.aliyun.mq</groupId>
<artifactId>mq-http-sdk</artifactId>
<version>X.X.X</version> // Set the value to the latest version of SDK for Java.
<classifier>jar-with-dependencies</classifier>
</dependency>
Note For more information about how to obtain SDK for Java, see Release notes.