Install the SDK Toolkit
Last Updated:2020-07-20
Running Environment
The Java SDK toolkit can run in the jdk1.7 and jdk1.8 environment.
Method 1: Install it through Maven
Add the dependency of bce-java-sdk in the Maven's pom.xml file:
<dependency>
<groupId>com.baidubce</groupId>
<artifactId>bce-java-sdk</artifactId>
<version>{version}</version>
</dependency>
Including{version}
is the version number, which is available on the SDK Download Page.
Method 2: Install it through the JAR directly
The installation steps are as follows:
- Download the latest version of compression sack of the Java SDK
- Decompress the downloaded
bce-java-sdk-{version}.zip
, and then copy it to the project folder. - Right-click "Project-> Properties-> Java Build Path-> Add JARs" in Eclipse.
- Add the SDK toolkit
lib/bce-java-sdk-{version}.jar
and the third-party dependency toolkitthird-party/*.jar
.
{version}
is the version number, which is available on the SDK Download Page.
SDK Directory Structure
com.baidubce
├── auth //BCE signature related classes
├── http //BCE Http communication related classes
├── internal //SDK internal class
├── model //BCE public model class
├── services
│ └─ bcc //BCC service related class
│ ├─ model //BCC internal model, such as Request or Response
│ ├─ BccClient.class //BCC Client Entry Class
│ └─ BccClientConfiguration.class //Configuration for BCC-specific HttpClient
├── util //BCE utility tools
├── BceClientConfiguration.class //Configuration of BCE's HttpClient
├── BceClientException.class //BCE client exception class
├── BceServiceException.class //The exception class after interacting with the BCE server
├── ErrorCode.class //BCE general error code
└── Region.class //Service region provided by BCE