百度智能云

All Product Document

          Key Management Service

          SDK Installation

          Runtime Environment

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

          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> 

          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 
          │    └─ kms                                   //  KMS's service related class 
          │       ├─ model                              //  KMS's internal model such as Request and Response 
          │       ├─ KmsClient.class                    //  KMS's client entry class 
          │       └─ KmsClientConfiguration.class       //  Configuration for KMS-specific HttpClient 
          ├── 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