Baidu AI Cloud
中国站

百度智能云

Cloud Compute Service

Install the SDK Toolkit

Running Environment

The Java SDK toolkit can run in the jdk1.7 and jdk1.8 environment.

Method 1: Install it through Maven

Add the dependency of bce-java-sdk in the Maven's pom.xml file:

<dependency>
    <groupId>com.baidubce</groupId>
    <artifactId>bce-java-sdk</artifactId>
    <version>{version}</version>
</dependency>

Including{version} is the version number, which is available on the SDK Download Page.

Method 2: Install it through the JAR directly

The installation steps are as follows:

  1. Download the latest version of compression sack of the Java SDK
  2. Decompress the downloaded bce-java-sdk-{version}.zip, and then copy it to the project folder.
  3. Right-click "Project-> Properties-> Java Build Path-> Add JARs" in Eclipse.
  4. Add the SDK toolkit lib/bce-java-sdk-{version}.jarand the third-party dependency toolkitthird-party/*.jar.

{version} is the version number, which is available on the SDK Download Page.

SDK Directory Structure

com.baidubce
├── auth                                        //BCE signature related classes
├── http                                        //BCE Http communication related classes
├── internal                                    //SDK internal class
├── model                                       //BCE public model class
├── services
│    └─ bcc                                 //BCC service related class
│       ├─ model                           //BCC internal model, such as Request or Response
│       ├─ BccClient.class                 //BCC Client Entry Class
│       └─ BccClientConfiguration.class    //Configuration for BCC-specific HttpClient
├── util                                      //BCE utility tools
├── BceClientConfiguration.class              //Configuration of BCE's HttpClient
├── BceClientException.class                  //BCE client exception class
├── BceServiceException.class                 //The exception class after interacting with the BCE server
├── ErrorCode.class                           //BCE general error code
└── Region.class                              //Service region provided by BCE
Previous
Overview
Next
Getting Started