百度智能云

All Product Document

          Database Transmission Server

          Install-DTS-Java-SDK

          Obtain a Key

          To use Baidu AI Cloud DTS, you need to have a valid AK (Access Key ID) and SK (Secret Access Key) for signature verification. AK/SK are assigned to users by the system, which are of string. AK/SK are used to identify users and implement the signature authentication for accessing BCC.

          You can obtain and understand your AK/SK information by following the steps below:

          Register a Baidu AI Cloud Account

          Create an AK/SK

          Running Environment

          The Java SDK toolkit must be run in JDK1.8 environment.

          Install SDK

          Please ensure that the following preconditions are prepared before start:

          • Download the latest version of Java SDK package, see [SDK Download](DTS/Java_SDK/SDK Download.md);
          • Apply for an account and open the privilege: You need to log in to Baidu AI Cloud to obtain the Access Key (AK) and the Secret Key(SK) on the Security Certification page. The AK /SK parameter must be passed in during SDK authentication.

          Install directly by Jar package

          1. Download the latest version of Java SDK package;
          2. Take Eclipse as an example to import the downloaded JAR package: Right-click the Project ->Properties -> Java Build Path -> Libraries-> Add External JARs on Eclipse, select the storage path of the JAR package, and add the downloaded jar package to the project;
          3. Select the JAR package and click the “OK” button. After the above steps, you can use the Java SDK subscribed by DTS data in the project.

          Command line running SDK

          Provided that the Demo.java containing the main function (see: Subscribe SDK with Data) is under the same directory as the Jar package (e.g.: dts-java-sdk-2.0.0.1-SNAPSHOT.jar), execute the following command:

          Compile

          javac -cp dts-java-sdk-2.0.0.1-SNAPSHOT.jar:. Demo.java

          Running

          java -cp dts-java-sdk-2.0.0.1-SNAPSHOT.jar:. Demo > console.log &

          During running SDK, the printed logs are saved in console.log in the same directory.

          Previous
          Overview
          Next
          Use the Data Subscription SDK