SDK Installation
Last Updated:2020-07-20
Operating Environment
The Java SDK runs in jdk1.7 and jdk1.8 environments.
Method 1: Use Maven to Install
Add bce-java-sdk dependency to Maven's pom.xml file:
<dependency>
<groupId>com.baidubce</groupId>
<artifactId>bce-java-sdk</artifactId>
<version>{version}</version>
</dependency>
In which, {version}
is the version number, which can be found on the SDK download page.
Method 2: Install Directly with JAR Package
The steps are as follows:
- Download the latest Java SDK compressed kit.
- Decompress the download
bce-java-sdk-{version}.zip
and copy it to the project folder. - Right-click "Project-> Properties-> Java Build Path-> Add JARs" in Eclipse.
- Add SDK
lib/bce-java-sdk-{version}.jar
and the third party dependency toolkitthird-party/*.jar
.
In which, {version}
is the version number, which can be found on the SDK download page.
SDK Directory Structure
com.baidubce
├── auth //BCE authorization
├── http //BCE Http communication
├── internal //SDK internal
├── model //BCE public model
├── services
│ └── tsdb //TSDB service
│ ├── model //TSDB internal model, such as Request or Response
│ ├── TsdbClient.class //TSDB client access
│ └── TsdbConstants.class //TSDB unique constants
├── util //BCE utility
├── BceClientConfiguration.class //HttpClient configuration of BCE
├── BceClientException.class //BCE client exception
├── BceServiceException.class //Exception after exchange with BCE server
├── ErrorCode.class //BCE general error code
└── Region.class //Regions with BCE service