Install the SDK Package

DNS

  • API Reference
    • API function release records
    • API Service Domain Name
    • Appendix
    • Common Headers and Error Responses
    • General Description
    • Interface Overview
    • Overview
    • Private DNS Related Interfaces
      • Add resolution record
      • Associate VPC
      • Create a PrivateZone
      • Delete PrivateZone
      • Delete resolution record
      • Disassociate VPC
      • Modify resolution record
      • Query details of a PrivateZone
      • Query PrivateZone list
      • Query resolution record list
      • Set Resolution Record Status
    • Public DNS Related Interfaces
      • Domain Name Related Interfaces
      • Line Group Related Interfaces
      • Resolution Records Related Interfaces
  • FAQs
    • General FAQs
  • Function Release Records
  • Operation guide
    • Identity and access management
    • Local DNS service
      • Add Private Zone
      • Add resolution record
      • Associate VPC
      • Delete Private Zone
      • Resolver
    • Public DNS service
      • Add domain name
      • Add resolution
      • Enable Resolution Service
      • Line Grouping Function
      • Manage Resolution
      • Resolution Line Selection
      • Upgrade Domain Name to Enterprise Edition Operation Guide
    • Resolution Logging Management
  • Product Description
    • Application scenarios
    • Product advantages
    • Product functions
    • Product overview
    • Usage restrictions
  • Product pricing
  • Quick Start
    • Activate Service
    • Use Resolution Service
  • SDK
    • Golang-SDK
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Version history
    • Java-SDK
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
    • Python-SDK
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
  • Service Level Agreement (SLA)
    • Internal DNS Service Level Agreement SLA
    • Public DNS Service Level Agreement SLA
  • Typical Practices
    • Implement URL Forwarding via Nginx
    • Local IDC Interconnection with Cloud DNS Service via Resolver
    • Quickly Set Up Private Domain Name Resolution Service Using Terraform
All documents
menu
No results found, please re-enter

DNS

  • API Reference
    • API function release records
    • API Service Domain Name
    • Appendix
    • Common Headers and Error Responses
    • General Description
    • Interface Overview
    • Overview
    • Private DNS Related Interfaces
      • Add resolution record
      • Associate VPC
      • Create a PrivateZone
      • Delete PrivateZone
      • Delete resolution record
      • Disassociate VPC
      • Modify resolution record
      • Query details of a PrivateZone
      • Query PrivateZone list
      • Query resolution record list
      • Set Resolution Record Status
    • Public DNS Related Interfaces
      • Domain Name Related Interfaces
      • Line Group Related Interfaces
      • Resolution Records Related Interfaces
  • FAQs
    • General FAQs
  • Function Release Records
  • Operation guide
    • Identity and access management
    • Local DNS service
      • Add Private Zone
      • Add resolution record
      • Associate VPC
      • Delete Private Zone
      • Resolver
    • Public DNS service
      • Add domain name
      • Add resolution
      • Enable Resolution Service
      • Line Grouping Function
      • Manage Resolution
      • Resolution Line Selection
      • Upgrade Domain Name to Enterprise Edition Operation Guide
    • Resolution Logging Management
  • Product Description
    • Application scenarios
    • Product advantages
    • Product functions
    • Product overview
    • Usage restrictions
  • Product pricing
  • Quick Start
    • Activate Service
    • Use Resolution Service
  • SDK
    • Golang-SDK
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Version history
    • Java-SDK
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
    • Python-SDK
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
  • Service Level Agreement (SLA)
    • Internal DNS Service Level Agreement SLA
    • Public DNS Service Level Agreement SLA
  • Typical Practices
    • Implement URL Forwarding via Nginx
    • Local IDC Interconnection with Cloud DNS Service via Resolver
    • Quickly Set Up Private Domain Name Resolution Service Using Terraform
  • Document center
  • arrow
  • DNS
  • arrow
  • SDK
  • arrow
  • Java-SDK
  • arrow
  • Install the SDK Package
Table of contents on this page
  • Runtime environment
  • Install SDK
  • Method I: Install with Maven
  • Method II: Install directly using the JAR package
  • SDK directory structure
  • Uninstall SDK

Install the SDK Package

Updated at:2025-11-11

Runtime environment

The Java SDK package supports both JDK 1.7 and JDK 1.8.

Install SDK

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>

Note: {version} is the version No., which can be found on the SDK Download Page.

Method II: Install directly using the JAR package

  1. Download the compressed toolkit for the latest version of the Java SDK.
  2. After downloading, extract the bce-java-sdk-version.zip file and copy it to the project folder.
  3. In Eclipse, right-click 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. Among them, {version} represents 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 │    └─ dns                                       //Classes related to public DNS service
8 │       ├─ model                                //Local model of public BCM, such as Request or Response
9 │       └─ DnsClient.java                       //Entry class for public DNS client
10 └─ localdns                                //Classes related to local DNS service
11 │       ├─ model                                //Local model of internal BCM, such as Request or Response
12 │       └─ LdClient.java                        //Entry class for local DNS client
13 ├── util                                         //BCE common utilities
14 ├── BceClientConfiguration.class              // Configuration for BCE HttpClient
15 ├── BceClientException.class                  // BCE client exception class
16 ├── BceServiceException.class                 // Exception class after BCE server interaction
17 ├── ErrorCode.class                           // BCE common error codes
18 └── Region.class                              // Regions where BCE provides services

Uninstall SDK

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

Previous
Golang-SDK
Next
Overview