Skip to main content

Apache OpenDAL™ Java Binding

A native Java binding for OpenDAL: access S3, GCS, Azure Blob, HDFS, the local filesystem, and 50+ more services through one API, with the performance of the Rust core underneath.

New to the model behind the API? Read Concepts first — service, operator, layer, operation are the same four ideas in every language.

note

This binding has its own version number, independent of the Rust core. Check compatibility against the binding's version, not the core's.

Status

Released and stable, published to Maven Central under the org.apache.opendal group.

Capabilities

  • Sync and async — use Operator for blocking calls or AsyncOperator for CompletableFuture-based calls, with the same verbs.
  • Typed or map-based config — build from a typed ServiceConfig builder or a plain Map<String, String>.
  • All services included — the native library bundles every backend; there are no build flags to enable.
  • Presigned URLs for services that support them (async API).

Installation

The binding ships a platform-specific native library, so you depend on the main artifact plus a classifier for your platform. The simplest setup uses an OS detector plugin to fill in the classifier automatically.

Maven

<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.7.0</version>
</extension>
</extensions>
</build>

<dependencies>
<dependency>
<groupId>org.apache.opendal</groupId>
<artifactId>opendal</artifactId>
<version>${opendal.version}</version>
</dependency>
<dependency>
<groupId>org.apache.opendal</groupId>
<artifactId>opendal</artifactId>
<version>${opendal.version}</version>
<classifier>${os.detected.classifier}</classifier>
</dependency>
</dependencies>

Gradle

plugins {
id "com.google.osdetector" version "1.7.3"
}

dependencies {
implementation "org.apache.opendal:opendal:$opendalVersion"
implementation "org.apache.opendal:opendal:$opendalVersion:$osdetector.classifier"
}

On musl-based Linux distributions such as Alpine, use the linux-x86_64-musl or linux-aarch_64-musl classifier instead of the detected one.

Next steps

  1. Getting started — a runnable program, then a real backend.
  2. Connecting to your storage — build an operator for any service.
  3. Common tasks — read, write, stream, list, presign, and more.
  4. Going to production — retries, errors, and capability checks.