欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

tencent cloud-Download and Installation

最编程 2024-02-24 20:42:29
...

Relevant resources

Download the Cloud Object Storage (COS) XML Java SDK source code here.
Download the XML Java SDK here.
Download the demo here.
For the complete sample code, see SDK Sample Code.
For the SDK changelog, see Changelog.
For SDK FAQs, see Java SDK FAQs.
Note:
If you are using COS for the first time, or your data volume is small, in order to avoid the problems of unnecessary and cumbersome code troubleshooting and program positioning, we recommend you use the more user-friendly GUI-based console, COSBrowser, or COSCLI.
If you encounter errors such as non-existent functions or methods when using the XML version of the SDK, please update the SDK to the latest version and try again.

Environmental dependencies

SDK supports JDK 1.8 or later. You can run the java -version command to query the Java version.
For the JDK installation, see Java Installation and Configuration.
Note:
For the definitions of terms such as SecretId, SecretKey, and Bucket, see COS Glossary.
You can find common classes for the COS Java SDK in the following packages:
The classes related to client configuration are in the com.qcloud.cos.* package.
The classes related to permissions are in the com.qcloud.cos.auth.* sub-package.
The classes related to exceptions are in the com.qcloud.cos.exception.* sub-package.
The classes related to requests are in the com.qcloud.cos.model.* sub-package.
The classes related to regions are in the com.qcloud.cos.region.* sub-package.
The classes related to advanced APIs are in the com.qcloud.cos.transfer.* sub-package.

Installing SDK

You can install the Java SDK using Maven or source code:
Using Maven Add required dependencies to the pom.xml file of your Maven project as follows:
<dependency>
<groupId>com.qcloud</groupId>
<artifactId>cos_api</artifactId>
<version>5.6.133</version>
</dependency>
Using source code Download the source code from GitHub or here, and import it using Maven. For example, to import it into Eclipse, select File > Import > Maven > Existing Maven Projects.

Uninstalling SDK

Uninstall the SDK by removing the POM dependencies or source code.