SDK Installation
Runtime Environment
- Runtime environment Java SDK toolkit can run under jdk1.7 or jdk1.8.
-
Entitlements and authentication To use Baidu AI Cloud products, you need to have a Baidu AI Cloud account and a valid AK (Access Key ID) and SK (Secret Access Key) for signature verification.
You can obtain and understand your AK/SK information through the following steps:
- [Register Baidu AI Cloud Account](https://login.bce.baidu.com/reg.html? tpl=bceplat&from=portal)
- [Create AK/SK](https://console.bce.baidu.com/iam/? =1513940574695#/iam/accesslist)
Install SDK
Method 1: Install with Maven
Add the bce-java-sdk dependency in Maven's pom.xml file:
<dependency>
<groupId>com.baidubce</groupId>
<artifactId>bce-java-sdk</artifactId>
<version>{version}</version>
</dependency> Among them, {version} is the version number, which can be found in Developer Resources SDK Center.
Method 2: Install directly using JAR package
- Download the Java SDK compression toolkit at Official Website.
- Unzip the downloaded
bce-java-sdk-version.zipand copy it to the project folder. - Right-click "Project > Properties > Java Build Path > Add JARs" in Eclipse.
-
Add SDK toolkit
lib/bce-java-sdk-version.jarand third-party dependency toolkitthird-party/*. Jar.Among them,
versionis the version number.
SDK's Directory Structure
com.baidubce
├── auth //BCE's signature
├── http //BCE's Http communication related class
├── internal //SDK's internal class
├── model //BCE's public model class
├── services
│ └── blb //BLB's service related class
│ ├── model //BLB's internal model such as Request and Response 或Response
│ └── BlbClient.class //BLB's client entry class
├── util //BCE's utility tool class
├── BceClientConfiguration.class //Configuration of BCE's HttpClient
├── BceClientException.class //Exception class of BCE's client
├── BceServiceException.class //The exception class after interacting with the BCE's server
├── ErrorCode.class //BCE's general error code
└── Region.class //BCE's service region Uninstall SDK
It is expected that you may simply delete the pom dependency or source code when uninstalling the SDK.
