百度智能云

All Product Document

          Load Balance

          SDK Installation

          Runtime Environment

          1. Runtime environment Java SDK toolkit can run under jdk1.7 or jdk1.8.
          2. Entitlements and authentication To use Baidu AI Cloud products, you need to have a Baidu AI Cloud account and a valid AK (Access Key ID) and SK (Secret Access Key) for signature verification.

            You can obtain and understand your AK/SK information through the following steps:

            1. [Register Baidu AI Cloud Account](https://login.bce.baidu.com/reg.html? tpl=bceplat&from=portal)
            2. [Create AK/SK](https://console.bce.baidu.com/iam/? =1513940574695#/iam/accesslist)

          Install SDK

          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> 

          Among them, {version} is the version number, which can be found in Developer Resources SDK Center.

          Method 2: Install directly using JAR package

          1. Download the Java SDK compression toolkit at Official Website.
          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 
                 ├── http                                        //BCE's Http communication related class 
                 ├── internal                                    //SDK's internal class
                 ├── model                                       //BCE's public model class 
                 ├── services
                 │       └── blb                              //BLB's service related class 
                 │           ├── model                           //BLB's internal model such as Request and Response 或Response
                 │           └── BlbClient.class              //BLB's client entry class 
                 ├── util                                        //BCE's utility tool class 
                 ├── BceClientConfiguration.class                //Configuration of BCE's HttpClient 
                 ├── BceClientException.class                    //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