Installing the Java SDK
Java SDK can be installed by importing Java SDK JAR file, adding Maven dependency, or downloading Java SDK from HUAWEI CLOUD mirror center.
Method 1: Importing Java SDK JAR File
You can download the JAR file from the GitHub website and import the package to the interactive development environment (IDE).
https://github.com/huaweicloud/huaweicloud-sdk-release/tree/master/java-sdk
- Copy the downloaded JAR file to the project folder.
- Open the project in Eclipse, right-click the project, and choose Properties.
- In the displayed dialog box, click Java Build Path. On the Libraries tab, click Add JARs to add the downloaded JAR file.
- Click OK.
Method 2: Adding Maven Dependency
Add the following dependency to the pom.xml file to install the Java SDK:
<dependency> <groupId>com.huawei</groupId> <artifactId>openstack4j</artifactId> <version>1.0.12</version> </dependency>
For the latest version supported by Java SDK, see here.
Method 3: Downloading Java SDK from HUAWEI CLOUD Mirror Center
- Find the global configuration file settings.xml of Maven. Generally, the file is located in conf of the Maven installation directory. For example, in Windows, you can locate the configuration file in D:\maven\apache-maven-3.3.9\conf\settings.xml.
- Locate mirror in settings.xml and add the following configurations:
<mirror>
<id>huaweicloud</id>
<mirrorOf>*,!HuaweiCloudSDK</mirrorOf>
<url>https://repo.huaweicloud.com/repository/maven/</url>
</mirror>
- Open the pom.xml file of the Maven project and add the following configuration to the <dependency> node:
<dependency>
<groupId>com.huawei</groupId>
<artifactId>openstack4j</artifactId>
<version>1.0.12</version>
</dependency>
For the latest version supported by Java SDK, see here.
Last Article: Using the Java SDK
Next Article: Java SDK Authentication Modes
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.