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.
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
Operatorfor blocking calls orAsyncOperatorforCompletableFuture-based calls, with the same verbs. - Typed or map-based config — build from a typed
ServiceConfigbuilder or a plainMap<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
- API reference: opendal.apache.org/docs/java
- Services & configuration: /services
- Upgrade guide:
upgrade.md - Source & examples:
bindings/java/
Next steps
- Getting started — a runnable program, then a real backend.
- Connecting to your storage — build an operator for any service.
- Common tasks — read, write, stream, list, presign, and more.
- Going to production — retries, errors, and capability checks.