Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Object Storage Service/ SDK Reference/ Java/ SDK Download and Installation (SDK for Java)

SDK Download and Installation (SDK for Java)

Updated on 2024-06-18 GMT+08:00

Downloading OBS SDK for Java

  • Latest version of OBS Java SDK source code: Download
  • Earlier version of OBS Java SDK: Download
NOTE:

If you need to add the SDK as a dependency in your Maven project, see Installing OBS SDK for Java.

Installing OBS SDK for Java

You can use the methods listed in Table 1 to install OBS SDK for Java.

Method 1: Using the Maven Central Repository and Maven Project

Before using this method, ensure that the Java and Maven environments are correctly configured and can be used properly.

  1. Access the Maven central repository to obtain the version number of OBS SDK for Java. You can either choose an OBS Bundle SDK for Java or a standard OBS SDK for Java. No matter Bundle or standard SDKs, a latest version is recommended. Bundle SDK 3.23.9 is used here.

    NOTE:
    • Bundle SDKs share the same source code as standard SDKs. The difference is that in Bundle SDKs, all third-party dependencies are organized into the SDK and are added from the SDK path. This means Bundle SDKs are freed from potential external dependency conflicts but require a larger space (over 7 MB).
    • If there is a dependency conflict when you use a standard SDK, resolve the issue by referring to Resolving Dependency Missing or Conflicts (SDK for Java).

  2. Open the pom.xml file of the Maven project and add dependency configurations to <dependencies>.

    If you choose to use a Bundle SDK, add the following configuration to <dependencies> and replace bundleVersionNumber with the SDK version number obtained in 1:

    1
    2
    3
    4
    5
    <dependency>
       <groupId>com.huaweicloud</groupId>
       <artifactId>esdk-obs-java-bundle</artifactId>
       <version>bundleVersionNumber</version>
    </dependency>
    

    In this example, the configurations shown below should be added for Bundle 3.23.9:

    1
    2
    3
    4
    5
    <dependency>
       <groupId>com.huaweicloud</groupId>
       <artifactId>esdk-obs-java-bundle</artifactId>
       <version>3.23.9</version>
    </dependency>
    

    If you choose to use a standard SDK, add the following configuration to <dependencies> and replace VersionNumber with the SDK version number obtained in 1:

    1
    2
    3
    4
    5
    <dependency>
       <groupId>com.huaweicloud</groupId>
       <artifactId>esdk-obs-java</artifactId>
       <version>versionNumber</version>
    </dependency>
    

  3. Click Reload All Maven Projects to refresh the Maven configuration.
  4. Check whether the SDK is successfully installed. If a JAR package for Java SDK is downloaded to the dependency path, the SDK is installed. If no JAR package is generated, check whether the pom.xml file is correctly configured and the version number of SDK is correctly replaced. If the fault persists, submit a service ticket.

Method 2: Using the Gradle Central Repository and Gradle Project

Before using this method, ensure that the Java and Gradle environments are correctly configured and can be used properly.

  1. Obtain the version number of OBS SDK for Java. You can either choose an OBS Bundle SDK for Java or a standard OBS SDK for Java. No matter Bundle or standard SDKs, a latest version is recommended. Bundle 3.23.9 is used here.

    NOTE:
    • Bundle SDKs share the same source code as standard SDKs. The difference is that in Bundle SDKs, all third-party dependencies are organized into the SDK and are added from the SDK path. This means Bundle SDKs are freed from potential external dependency conflicts but require a larger space (over 7 MB).
    • If there is a dependency conflict when you use a standard SDK, resolve the issue by referring to Resolving Dependency Missing or Conflicts (SDK for Java).

  2. Open the build.gradle file of the Gradle project and add the dependency configurations to dependencies.

    If you choose to use a Bundle SDK, add the following configuration to <dependencies> and replace bundleVersionNumber with the SDK version number obtained in 1:

    1
    api 'com.huaweicloud:esdk-obs-java-bundle:bundleVersionNumber'
    

    In this example, the configurations shown below should be added for Bundle 3.23.9:

    1
    api 'com.huaweicloud:esdk-obs-java-bundle:3.23.9'
    

    If you choose to use a standard SDK, add the following configurations to <dependencies> and replace VersionNumber with the SDK version number obtained in 1:

    1
    api 'com.huaweicloud:esdk-obs-java:versionNumber'
    

  3. Click Reload All Gradle Projects to refresh the Gradle configuration.
  4. Check whether the SDK is successfully installed. If a JAR package for Java SDK is downloaded to the dependency path, the SDK is installed. If no JAR package is generated, check whether the build.gradle file is correctly configured and the version number of SDK is correctly replaced. If the fault persists, submit a service ticket.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback