Install the SDK Package
Updated at:2025-10-16
Runtime environment
The Java SDK package supports both JDK 1.7 and JDK 1.8.
Method I: Install with Maven
Add the bce-java-sdk dependency in your Maven pom.xml file:
Plain Text
1<dependency>
2 <groupId>com.baidubce</groupId>
3 <artifactId>bce-java-sdk</artifactId>
4 <version>{version}</version>
5</dependency>
Where, {version} is the version number, which can be found on the SDK download page.
Method II: Install directly using the JAR package
- Download the compressed toolkit for the latest version of the Java SDK.
- After downloading, unzip
bce-java-sdk-version.zipand replicate it to the project folder. - Right-click within Eclipse and select "Project -> Properties -> Java Build Path -> Add JARs.\
- Add the SDK toolkit
lib/bce-java-sdk-version.jarand third-party dependency toolkitsthird-party/*.jar. Where,{version}is the version number, which can be found on the SDK Download page.
SDK directory structure
Plain Text
1 com.baidubce
2 ├── auth //BCE signature classes
3 ├── http //BCE HTTP communication classes
4 ├── internal // SDK internal classes
5 ├── model // BCE common model classes
6 ├── services
7 │ └─ eip //EIP service-related classes
8 │ ├─ model //Internal EIP models, such as request or response
9 │ └─ EipClient.class //EIP client entry class
10 │ └─ eipgroup //EIPGROUP service-related classes
11 │ ├─ model //EIPGROUP internal model
12 │ ├─ EipGroupClient.class //EIPGROUP client entry class
13 │ └─ EipGroupClientConfiguration.class //EIPGROUP-specific HttpClient configuration
14 ├── util //BCE common utilities
15 ├── BceClientConfiguration.class // Configuration for BCE HttpClient
16 ├── BceClientException.class // BCE client exception class
17 ├── BceServiceException.class // Exception class after BCE server interaction
18 ├── ErrorCode.class // BCE common error codes
19 └── Region.class // Regions where BCE provides services
Uninstall SDK
To uninstall the SDK, remove the pom dependency or the source code.
