Before you use SDK for Java to send and subscribe to messages, perform the steps in this topic to prepare the environment.

Environment requirements

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.