Install SDK

Finance Finance

  • API Reference
    • Access control
    • Balance Query Related Interfaces
      • Account Balance Query
    • Bill Related Interfaces
      • Appendix
      • Charge Item Bill
      • Python Request Example
      • Resource Month Bill
    • Error response
    • Feature Update Records
    • General Description
    • Interface Specifications
    • Introduction
  • Bill Management
    • Bill Details
    • Bill Subscription
    • Consumption Information Subscription Guide
    • Consumption Overview
    • How to View
    • Tag-Based Billing
  • Charge
    • Billing & Configuration Changes
      • Configuration Upgrade Or Shrinkage
      • Shift Charge
    • Charge type
    • On-Demand Billing
    • Pay-as-you-go
    • Subscription billing
  • Contract
    • Apply for Electronic Contract
    • Overview
  • Cost Management
    • Cost Allocation
    • Cost Splitting
  • Disclaimer
  • Enterprise Organization Financial Management
  • FAQs
    • Bill and Debt
    • Billing Issues
    • Common Questions Overview
    • Contract Issues
    • Coupon Issues
    • Dedicated Account Remittance Issues
    • Invoice Issues
    • Order Issues
    • Recharge Issues
    • Refund Issues
    • Renew Issues
    • Withdrawal Issues
  • Invoice
    • Apply for Baidu Intelligent Cloud Invoice
    • Return or Exchange Baidu Intelligent Cloud Invoice
  • Multi-Account Multi-User Financial Management
    • Enterprise Organization - Financial Management
    • Multi-User Access Control - Financial Permission
    • Unified Finance
  • Order Management
  • Overview
  • Partner Deposit Payment
  • Purchase Guide
    • Coupon
      • Activating Coupons
      • Coupon Overview
      • Using Coupons
      • Viewing Coupons
    • Income and Expense Details
    • Purchase
    • Recharge
      • Exclusive Account Wire Transfer
      • Recharge Operations
      • Viewing Balance
    • Refund and Compensation
      • Product Compensation Standards
      • Refund Application Process
      • Refund policy
      • Unsubscribe Overview
      • Unsubscribe Rule Description
    • Renew
      • Auto-renewal
      • Renew Overview
      • Unified Resource Expiration Time
    • Withdrawal
  • Resource Package Management
    • Resource Package Deduction Details
    • Resource Package Overview
  • SDK
    • Java-SDK
      • Bill
      • BillingClient
      • Exception handling
      • Install SDK
      • Overview
      • Version Update Description
All documents
menu
No results found, please re-enter

Finance Finance

  • API Reference
    • Access control
    • Balance Query Related Interfaces
      • Account Balance Query
    • Bill Related Interfaces
      • Appendix
      • Charge Item Bill
      • Python Request Example
      • Resource Month Bill
    • Error response
    • Feature Update Records
    • General Description
    • Interface Specifications
    • Introduction
  • Bill Management
    • Bill Details
    • Bill Subscription
    • Consumption Information Subscription Guide
    • Consumption Overview
    • How to View
    • Tag-Based Billing
  • Charge
    • Billing & Configuration Changes
      • Configuration Upgrade Or Shrinkage
      • Shift Charge
    • Charge type
    • On-Demand Billing
    • Pay-as-you-go
    • Subscription billing
  • Contract
    • Apply for Electronic Contract
    • Overview
  • Cost Management
    • Cost Allocation
    • Cost Splitting
  • Disclaimer
  • Enterprise Organization Financial Management
  • FAQs
    • Bill and Debt
    • Billing Issues
    • Common Questions Overview
    • Contract Issues
    • Coupon Issues
    • Dedicated Account Remittance Issues
    • Invoice Issues
    • Order Issues
    • Recharge Issues
    • Refund Issues
    • Renew Issues
    • Withdrawal Issues
  • Invoice
    • Apply for Baidu Intelligent Cloud Invoice
    • Return or Exchange Baidu Intelligent Cloud Invoice
  • Multi-Account Multi-User Financial Management
    • Enterprise Organization - Financial Management
    • Multi-User Access Control - Financial Permission
    • Unified Finance
  • Order Management
  • Overview
  • Partner Deposit Payment
  • Purchase Guide
    • Coupon
      • Activating Coupons
      • Coupon Overview
      • Using Coupons
      • Viewing Coupons
    • Income and Expense Details
    • Purchase
    • Recharge
      • Exclusive Account Wire Transfer
      • Recharge Operations
      • Viewing Balance
    • Refund and Compensation
      • Product Compensation Standards
      • Refund Application Process
      • Refund policy
      • Unsubscribe Overview
      • Unsubscribe Rule Description
    • Renew
      • Auto-renewal
      • Renew Overview
      • Unified Resource Expiration Time
    • Withdrawal
  • Resource Package Management
    • Resource Package Deduction Details
    • Resource Package Overview
  • SDK
    • Java-SDK
      • Bill
      • BillingClient
      • Exception handling
      • Install SDK
      • Overview
      • Version Update Description
  • Document center
  • arrow
  • FinanceFinance
  • arrow
  • SDK
  • arrow
  • Java-SDK
  • arrow
  • Install SDK
Table of contents on this page
  • Environment preparation
  • Download and installation

Install SDK

Updated at:2025-10-27

Environment preparation

  1. Operating environment
    The Java SDK package can run on JDK1.7 and JDK1.8.
  2. Authentication and certification
    To use the Baidu AI Cloud product, you need a Baidu AI Cloud account, a valid AK (Access Key ID) and SK (Secret Access Key) for signature certification.

    Plain Text
    1	Your AK/SK information can be obtained and understood through the following steps:
    2	1. [Register a Baidu AI Cloud account](https://login.bce.baidu.com/reg.html?tpl=bceplat&from=portal)
    3
    4	2. [Create AK/SK](Reference/Retrieve AK and SK/How to Obtain AKSK.md)

Download and installation

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 at the SDK Developer Resource Center.

Method II: Install directly with JAR packages

  1. Download the compressed Java SDK from the Official Website.
  2. After downloading, unzip bce-java-sdk-version.zip and replicate it to the project folder.
  3. Right-click within Eclipse and select "Project -> Properties -> Java Build Path -> Add JARs.\
  4. Add the SDK toolkit lib/bce-java-sdk-version.jar and third-party dependency toolkits third-party/*.jar.

    Where, version is the version number.

SDK directory structure

Plain Text
1com.baidubce
2 ├── auth                                        //BCE signature class
3 ├── http                                        //BCE HTTP communication class
4 ├── internal                                    //SDK internal class
5 ├── model                                       //BCE common model class
6       ├── services
7 │       └── billing                             //Classes related to the billing service
8 │           ├── example                         //Example code for using the billing API
9 │           ├── model                           //Billing related models, such as Request or Response
10 │           └── BillingClient.class             //Entry class for the billing client
11 ├── util                                        //BCE common utilities
12 ├── BceClientConfiguration.class                //Configuration for BCE HttpClient
13 ├── BceClientException.class                    //BCE client exception class
14 ├── BceServiceException.class                   // Exception class after BCE server interaction
15 ├── ErrorCode.class                           // BCE common error codes
16 └── Region.class                              // Regions where BCE provides services

Uninstall SDK To uninstall the SDK, simply remove the pom dependency or source code.

Previous
Exception handling
Next
Overview