百度智能云

All Product Document

          Virtual Private Cloud

          SDK Installation

          Runtime Environment

          Java SDK toolkit can run under jdk1.7 or jdk1.8.

          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. In Which, {version} is the version number which can be found in the SDK download page.

          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 
            │     └─ route                                  //Route service related classes 
            │       ├─ model                                //Route's internal model such as Request and Response 
            │        └─ RouteClient.class                   //Route's client entry class 
            │        └─ RouteClientConfiguration.class      //Configuration for Route-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 un-installing the SDK.

          Previous
          Overview
          Next
          Vpc