Install the SDK Package
Last Updated:2025-11-14
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:
<dependency>
<groupId>com.baidubce</groupId>
<artifactId>bce-java-sdk</artifactId>
<version>{version}</version>
</dependency>Where, {version} is the version number, which can be found on the SDK Download page.
Method II: Install directly with JAR packages
Steps are as follows:
- 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
com.baidubce
├── auth //BCE signature classes
├── http //BCE HTTP communication classes
├── internal // SDK internal classes
├── model // BCE common model classes
├── services
│ └─ bcm //BCM service-related classes
│ ├─ model //Internal BCM models, such as Request or Response
│ ├─ BcmClient.class //BCM client entry class
│ └─ BcmClientConfiguration.class //Configuration for BCM-specific HttpClient
├── util //BCE common utilities
├── BceClientConfiguration.class // Configuration for BCE HttpClient
├── BceClientException.class // BCE client exception class
├── BceServiceException.class // Exception class after BCE server interaction
├── ErrorCode.class // BCE common error codes
└── Region.class // Regions where BCE provides services