百度智能云

All Product Document

          Finance

          SDK Installation

          Environmental Preparation

          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
            2. Create AK/SK

          Download and Install

          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 signature related class 
                 ├── http                                         //BCE Http communication related class 
                 ├── internal                                     //SDK internal class 
                 ├── model                                        //BCE common model class 
                 ├── services
                 │        └── billing                              //billing service related classes 
                 │            ├── example                          //example code for billing API use 
                 │            ├── model                            //billing related models, such as Request and Response 
                 │            └── BillingClient.class              //billing client entrance class 
                 ├── util                                         //BCE common tool class 
                 ├── BceClientConfiguration.class                 // HttpClient configuration for BCE 
                 ├── BceClientException.class                     //BCE BCE client exception class 
                 ├── BceServiceException.class                    // Exception class after interaction with BCE client 
                 ├── ErrorCode.class                              //BCE general error code 
                 └── Region.class                                 //Region where BCE provides services 

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

          Previous
          Overview
          Next
          BillingClient