百度智能云

All Product Document

          Object Storage

          SDK Installation

          Runtime Environment

          Java SDK tool kit can run in JDK1.7, JDK1.8 environment.

          Install SDK

          • Object stores the Java SDK source code address Java SDK
          • Object store Java SDK sample Demo

          Method 1: Install with Maven

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

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

          Where, {version} is version number which can be found in SDK Download Page

          Method 2: Install Directly Using JAR Package

          1.Download the latest Java SDK compression tool kit.

          2.Unzip the downloaded bce-java-sdk-version.zip and copy it to the project folder.

          3.Right-click "Project > Properties > Java Build Path > Add JARs" in Eclipse.

          4.Add SDK toolkit lib/bce-java-sdk-version.jar and third-party dependency toolkit third-party/*. Jar.

          Among them, version is the version number.

          SDK's Directory Structure

          com.baidubce 
          ├── auth                                        //BCE's signature related class 
          ├── http                                         //BCE's Http communication related class 
          ├── internal                                    //SDK's internal class 
          ├── model                                       //BCE's public model class 
          ├── services 
          │    └─ bos                                  //BOS service related class 
          │       ├─ model                           //Internal model of BOS, such as Request or Response 
          │       ├─ BosClient.class                  //BOS client entry class 
          │       └─ BosClientConfiguration.class    //Configuration for BOS-specific HttpClient 
          ├── util                                      //BCE's utility tool class 
          ├── BceClientConfiguration.class              //Configuration of BCE's HttpClient 
          ├── BceClientException.classs                  //Exception class of BCE's client 
          ├── BceServiceException.class                //The exception class after interacting with the BCE's server 
          ├── ErrorCode.class                            //BCE's general error code 
          └── Region.class                             //BCE's service region 

          Uninstall SDK

          It is expected that you may simply delete the pom dependency or source code when uninstalling the SDK.

          Previous
          Overview
          Next
          Initialization