title: Java sidebar_label: Overview slug: /bindings/java description: The OpenDAL Java binding — install it, see what it supports, and where to go next.

Apache OpenDAL™ Java Binding

A native Java binding for OpenDAL with one API for S3, GCS, Azure Blob, the local filesystem, and other storage services.

New to the model behind the API? Read Concepts first — the shared storage semantics and path and operation concepts every binding expresses through its own native API.

:::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>.
  • Services — the native JAR includes the services selected at build time.
  • Presigned URLs for services that support them (async API).

Installation

The all classifier bundles the Java API and the JNI libraries for all seven published platforms. Declare a single Maven dependency to compile and run without an OS detector plugin or a separate platform JAR.

<dependency>
  <groupId>org.apache.opendal</groupId>
  <artifactId>opendal</artifactId>
  <version>${opendal.version}</version>
  <classifier>all</classifier>
</dependency>

For Gradle, use implementation "org.apache.opendal:opendal:$opendalVersion:all". The all JAR is about 200 MB. To download only the native library for your target platform, use the default JAR and a platform classifier as shown below.

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.

Useful Links

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.