百度智能云

All Product Document

          CDN

          SDK Installation Toolkit

          Running environment

          Java SDK toolkit can run under jdk 1.6, jdk1.7 or jdk1.8.

          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 Java SDK compression kit from 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 related class 
                 ├── http                                        //BCE's Http communication related class 
                 ├── internal                                    //SDK's internal class 
                 ├── model                                       //BCE's public model class 
                 ├── services 
                 │       └── cdn                                 //CDN service related 
                 │           ├── model                           //CDN's internal model such as Request and Response 
                 │           ├── CdnClient.class                 //CDN client entrance 
                 ├── 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 
          Previous
          Overview
          Next
          Getting Started