diff --git a/.github/actions/setup-hadoop/action.yaml b/.github/actions/setup-hadoop/action.yaml
index 835371e42c5c..476bbb07160f 100644
--- a/.github/actions/setup-hadoop/action.yaml
+++ b/.github/actions/setup-hadoop/action.yaml
@@ -28,8 +28,8 @@ runs:
- name: Setup java env
uses: actions/setup-java@v4
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 11
- name: Cache hadoop
id: cache-hadoop
@@ -51,7 +51,7 @@ runs:
run: |
export HADOOP_HOME=/home/runner/hadoop-3.3.5
echo "HADOOP_HOME=${HADOOP_HOME}" >> $GITHUB_ENV
- echo "CLASSPATH=$(${HADOOP_HOME}/bin/hadoop classpath --glob)" >> $GITHUB_ENV
+ echo "CLASSPATH=$(${HADOOP_HOME}/bin/hadoop classpath --glob)" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${{ env.JAVA_HOME }}/lib/server:${HADOOP_HOME}/lib/native" >> $GITHUB_ENV
cp ${{ github.workspace }}/fixtures/hdfs/hdfs-site.xml ${HADOOP_HOME}/etc/hadoop/hdfs-site.xml
diff --git a/.github/actions/test_behavior_binding_java/action.yaml b/.github/actions/test_behavior_binding_java/action.yaml
index d9252b1c324f..8adbb3142872 100644
--- a/.github/actions/test_behavior_binding_java/action.yaml
+++ b/.github/actions/test_behavior_binding_java/action.yaml
@@ -41,7 +41,7 @@ runs:
- name: Run Test Binding Java
shell: bash
working-directory: bindings/java
- run: ./mvnw test -Dtest="behavior.*Test" -Dcargo-build.features=${{ inputs.feature }}
+ run: ./mvnw test -Dtest="behavior.*Test"
env:
OPENDAL_TEST: ${{ inputs.service }}
EOF
diff --git a/.github/scripts/test_behavior/plan.py b/.github/scripts/test_behavior/plan.py
index 162ea2f85537..65651553eeb4 100755
--- a/.github/scripts/test_behavior/plan.py
+++ b/.github/scripts/test_behavior/plan.py
@@ -175,7 +175,7 @@ def mark_service_affected(service: str) -> None:
hint.binding_go = True
hint.all_service = True
- # cpp affected
+ # cpp affected
if p.startswith("bindings/cpp/"):
hint.binding_cpp = True
hint.all_service = True
@@ -267,9 +267,15 @@ def generate_language_binding_cases(
# Bindings may be treated as parallel requests, so we need to disable it for all languages.
cases = [v for v in cases if v["service"] != "aliyun_drive"]
- # Remove hdfs cases for java and go.
+ # Remove invalid cases for java.
if language == "java":
- cases = [v for v in cases if v["service"] != "hdfs"]
+ cases = [v for v in cases if v["service"] not in [
+ "compfs",
+ "hdfs",
+ "hdfs_native",
+ "monoiofs",
+ "rocksdb",
+ ]]
if os.getenv("GITHUB_IS_PUSH") == "true":
return cases
diff --git a/.github/services/hdfs/hdfs_default_gcs/action.yml b/.github/services/hdfs/hdfs_default_gcs/action.yml
index 578220972ffb..b264e8e70c25 100644
--- a/.github/services/hdfs/hdfs_default_gcs/action.yml
+++ b/.github/services/hdfs/hdfs_default_gcs/action.yml
@@ -24,8 +24,8 @@ runs:
- name: Setup java env
uses: actions/setup-java@v4
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 11
- name: Load secrets
uses: 1password/load-secrets-action@13f58eec611f8e5db52ec16247f58c508398f3e6 # v3
with:
diff --git a/.github/services/hdfs/hdfs_default_on_azurite_azblob/action.yml b/.github/services/hdfs/hdfs_default_on_azurite_azblob/action.yml
index 94a2763af763..11ac22c2e873 100644
--- a/.github/services/hdfs/hdfs_default_on_azurite_azblob/action.yml
+++ b/.github/services/hdfs/hdfs_default_on_azurite_azblob/action.yml
@@ -24,8 +24,8 @@ runs:
- name: Setup java env
uses: actions/setup-java@v4
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 11
- name: Setup azurite azblob service
shell: bash
working-directory: fixtures/azblob
diff --git a/.github/services/hdfs/hdfs_default_on_minio_s3/action.yml b/.github/services/hdfs/hdfs_default_on_minio_s3/action.yml
index e75b8e415627..cd8128aa9fae 100644
--- a/.github/services/hdfs/hdfs_default_on_minio_s3/action.yml
+++ b/.github/services/hdfs/hdfs_default_on_minio_s3/action.yml
@@ -24,8 +24,8 @@ runs:
- name: Setup java env
uses: actions/setup-java@v4
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 11
- name: Setup MinIO Server
shell: bash
working-directory: fixtures/s3
diff --git a/.github/workflows/ci_bindings_java.yml b/.github/workflows/ci_bindings_java.yml
index 682fd892e3b2..1003b8ace82a 100644
--- a/.github/workflows/ci_bindings_java.yml
+++ b/.github/workflows/ci_bindings_java.yml
@@ -46,17 +46,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- - name: Set up JDK 21
+ - name: Set up Rust toolchain
+ uses: ./.github/actions/setup
+ with:
+ need-nextest: true
+ need-protoc: true
+ need-rocksdb: true
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Set up JDK 25
uses: actions/setup-java@v5
with:
- distribution: 'zulu'
- java-version: '21'
+ distribution: zulu
+ java-version: 25
cache: 'maven'
- name: Build and check
working-directory: bindings/java
run: |
./mvnw clean compile spotless:check
-
- name: Check Clippy
working-directory: bindings/java
run: cargo clippy -- -D warnings
@@ -64,19 +70,33 @@ jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
+ fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest
- windows-latest
+ java-version:
+ - 8
+ - 11
+ - 17
+ - 21
+ - 25
steps:
- uses: actions/checkout@v6
- - name: Set up JDK 8
+ - name: Set up Rust toolchain
+ uses: ./.github/actions/setup
+ with:
+ need-nextest: true
+ need-protoc: true
+ need-rocksdb: true
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ - name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
- distribution: 'zulu'
- java-version: '8'
+ distribution: zulu
+ java-version: ${{ matrix.java-version }}
cache: 'maven'
- name: Build and test
working-directory: bindings/java
diff --git a/.github/workflows/ci_core.yml b/.github/workflows/ci_core.yml
index 26466107755f..cca7020a4c13 100644
--- a/.github/workflows/ci_core.yml
+++ b/.github/workflows/ci_core.yml
@@ -48,8 +48,8 @@ jobs:
- name: Checkout java env
uses: actions/setup-java@v5
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 25
- name: Cargo doc
working-directory: core
@@ -70,8 +70,8 @@ jobs:
- name: Checkout java env
uses: actions/setup-java@v5
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 25
- name: Cargo clippy
working-directory: core
@@ -126,8 +126,8 @@ jobs:
- name: Checkout java env
uses: actions/setup-java@v5
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 25
- name: Setup Rust toolchain
uses: ./.github/actions/setup
@@ -157,8 +157,8 @@ jobs:
- name: Checkout java env
uses: actions/setup-java@v5
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 25
- name: Setup Rust toolchain
uses: ./.github/actions/setup
@@ -266,8 +266,8 @@ jobs:
- name: Checkout java env
uses: actions/setup-java@v5
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 25
- name: Setup Rust toolchain
uses: ./.github/actions/setup
@@ -311,8 +311,8 @@ jobs:
- name: Checkout java env
uses: actions/setup-java@v5
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 25
- name: Setup Rust toolchain
uses: ./.github/actions/setup
diff --git a/.github/workflows/ci_integration_spring.yml b/.github/workflows/ci_integration_spring.yml
index f848dbef757e..de92370273f7 100644
--- a/.github/workflows/ci_integration_spring.yml
+++ b/.github/workflows/ci_integration_spring.yml
@@ -45,8 +45,8 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v5
with:
- java-version: '17'
- distribution: 'temurin'
+ java-version: 25
+ distribution: zulu
- name: package and test
working-directory: integrations/spring
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index fb03aa5d40ea..94b7868f80f8 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -65,8 +65,8 @@ jobs:
- uses: actions/setup-java@v5
with:
- distribution: temurin
- java-version: "17"
+ distribution: zulu
+ java-version: 25
- name: Build OpenDAL doc
working-directory: core
@@ -88,12 +88,12 @@ jobs:
- uses: actions/setup-java@v5
with:
- distribution: temurin
- java-version: "17"
+ distribution: zulu
+ java-version: 25
- name: Build and test
working-directory: bindings/java
- run: mvn javadoc:javadoc
+ run: ./mvnw javadoc:javadoc
- name: Upload docs
uses: actions/upload-artifact@v6
diff --git a/.github/workflows/release_java.yml b/.github/workflows/release_java.yml
index 7f17493302e5..c4a9daef158d 100644
--- a/.github/workflows/release_java.yml
+++ b/.github/workflows/release_java.yml
@@ -55,7 +55,7 @@ jobs:
- name: Set up JDK 8
uses: actions/setup-java@v5
with:
- distribution: "zulu"
+ distribution: zulu
java-version: "8"
cache: "maven"
server-id: apache.releases.https
@@ -84,7 +84,6 @@ jobs:
-DskipTests=true \
-Djni.classifier=${{ matrix.classifier }} \
-Dcargo-build.profile=release \
- -Dcargo-build.features=services-all \
-Dcargo-build.enableZigbuild=${{ env.CARGO_BUILD_ENABLE_ZIGBUILD }} \
-DaltStagingDirectory=local-staging \
-DskipRemoteStaging=true \
@@ -113,7 +112,7 @@ jobs:
- name: Set up JDK 8
uses: actions/setup-java@v5
with:
- distribution: "zulu"
+ distribution: zulu
java-version: "8"
cache: "maven"
server-id: apache.releases.https
diff --git a/.github/workflows/release_rust.yml b/.github/workflows/release_rust.yml
index 28ac09ed25bc..fefab0605bc5 100644
--- a/.github/workflows/release_rust.yml
+++ b/.github/workflows/release_rust.yml
@@ -56,8 +56,8 @@ jobs:
- name: Checkout java env
uses: actions/setup-java@v5
with:
- distribution: temurin
- java-version: "11"
+ distribution: zulu
+ java-version: 25
- name: Setup Rust toolchain
uses: ./.github/actions/setup
diff --git a/bindings/java/Cargo.toml b/bindings/java/Cargo.toml
index 64b0fb877848..684ba22511c1 100644
--- a/bindings/java/Cargo.toml
+++ b/bindings/java/Cargo.toml
@@ -30,8 +30,21 @@ rust-version = "1.85"
crate-type = ["cdylib"]
doc = false
-[features]
-default = [
+[dependencies]
+jni = { version = "0.21.1" }
+# opendal-java won't be published to crates.io, we always use the local version
+opendal = { version = ">=0", path = "../../core", default-features = false, features = [
+ "blocking",
+ "reqwest-rustls-tls",
+ "executors-tokio",
+
+ # enabled layers
+ "layers-concurrent-limit",
+ "layers-logging",
+ "layers-retry",
+ "layers-timeout",
+
+ # enabled services
"services-azblob",
"services-azdls",
"services-cos",
@@ -46,10 +59,6 @@ default = [
"services-s3",
"services-webdav",
"services-webhdfs",
-]
-
-services-all = [
- "default",
"services-aliyun-drive",
"services-cacache",
"services-dashmap",
@@ -90,77 +99,8 @@ services-all = [
"services-seafile",
"services-upyun",
"services-yandex-disk",
-]
-
-# Optional services provided by opendal.
-services-aliyun-drive = ["opendal/services-aliyun-drive"]
-services-alluxio = ["opendal/services-alluxio"]
-services-azblob = ["opendal/services-azblob"]
-services-azdls = ["opendal/services-azdls"]
-services-azfile = ["opendal/services-azfile"]
-services-b2 = ["opendal/services-b2"]
-services-cacache = ["opendal/services-cacache"]
-services-cloudflare-kv = ["opendal/services-cloudflare-kv"]
-services-compfs = ["opendal/services-compfs"]
-services-cos = ["opendal/services-cos"]
-services-dashmap = ["opendal/services-dashmap"]
-services-dbfs = ["opendal/services-dbfs"]
-services-dropbox = ["opendal/services-dropbox"]
-services-etcd = ["opendal/services-etcd"]
-services-foundationdb = ["opendal/services-foundationdb"]
-services-fs = ["opendal/services-fs"]
-services-ftp = ["opendal/services-ftp"]
-services-gcs = ["opendal/services-gcs"]
-services-gdrive = ["opendal/services-gdrive"]
-services-ghac = ["opendal/services-ghac"]
-services-github = ["opendal/services-github"]
-services-gridfs = ["opendal/services-gridfs"]
-services-hdfs = ["opendal/services-hdfs"]
-services-hdfs-native = ["opendal/services-hdfs-native"]
-services-hf = ["opendal/services-hf"]
-services-http = ["opendal/services-http"]
-services-huggingface = ["services-hf"]
-services-ipfs = ["opendal/services-ipfs"]
-services-ipmfs = ["opendal/services-ipmfs"]
-services-koofr = ["opendal/services-koofr"]
-services-lakefs = ["opendal/services-lakefs"]
-services-memcached = ["opendal/services-memcached"]
-services-memory = ["opendal/services-memory"]
-services-mini-moka = ["opendal/services-mini-moka"]
-services-moka = ["opendal/services-moka"]
-services-mongodb = ["opendal/services-mongodb"]
-services-monoiofs = ["opendal/services-monoiofs"]
-services-mysql = ["opendal/services-mysql"]
-services-obs = ["opendal/services-obs"]
-services-onedrive = ["opendal/services-onedrive"]
-services-oss = ["opendal/services-oss"]
-services-pcloud = ["opendal/services-pcloud"]
-services-persy = ["opendal/services-persy"]
-services-postgresql = ["opendal/services-postgresql"]
-services-redb = ["opendal/services-redb"]
-services-redis = ["opendal/services-redis"]
-services-rocksdb = ["opendal/services-rocksdb"]
-services-s3 = ["opendal/services-s3"]
-services-seafile = ["opendal/services-seafile"]
-services-sftp = ["opendal/services-sftp"]
-services-sled = ["opendal/services-sled"]
-services-sqlite = ["opendal/services-sqlite"]
-services-surrealdb = ["opendal/services-surrealdb"]
-services-swift = ["opendal/services-swift"]
-services-tikv = ["opendal/services-tikv"]
-services-upyun = ["opendal/services-upyun"]
-services-vercel-artifacts = ["opendal/services-vercel-artifacts"]
-services-vercel-blob = ["opendal/services-vercel-blob"]
-services-webdav = ["opendal/services-webdav"]
-services-webhdfs = ["opendal/services-webhdfs"]
-services-yandex-disk = ["opendal/services-yandex-disk"]
-
-[dependencies]
-anyhow = { version = "1.0.100" }
-jni = { version = "0.21.1" }
-# this crate won't be published, we always use the local version
-opendal = { version = ">=0", path = "../../core", features = ["blocking"] }
-tokio = { version = "1.28.1", features = ["full"] }
+] }
+tokio = { version = "1.49.0", features = ["full"] }
# This is not optimal. See also the Cargo issue:
# https://github.com/rust-lang/cargo/issues/1197#issuecomment-1641086954
diff --git a/bindings/java/README.md b/bindings/java/README.md
index 71a249942a66..24e892de22fc 100644
--- a/bindings/java/README.md
+++ b/bindings/java/README.md
@@ -155,16 +155,6 @@ You can run service behavior tests of enabled with the following command:
./mvnw test -Dtest="behavior.*Test"
```
-Remember to enable the necessary features via `-Dcargo-build.features=services-xxx` when running specific service test:
-
-```shell
-export OPENDAL_TEST=redis
-export OPENDAL_REDIS_ENDPOINT=tcp://127.0.0.1:6379
-export OPENDAL_REDIS_ROOT=/
-export OPENDAL_REDIS_DB=0
-./mvnw test -Dtest="behavior.*Test" -Dcargo-build.features=services-redis
-```
-
## Used by
Check out the [users](./users.md) list for more details on who is using OpenDAL.
diff --git a/bindings/java/pom.xml b/bindings/java/pom.xml
index cb8b71be7d6f..575d470fe671 100644
--- a/bindings/java/pom.xml
+++ b/bindings/java/pom.xml
@@ -53,33 +53,34 @@
- 10
+ 2026-01-01T00:00:00Z
UTF-8
+ UTF-8
1.8
1.8
dev
- default
false
${os.detected.classifier}
- 3.23.1
- 2.16.1
+ 3.27.7
+ 2.21.0
2.3.2
- 1.18.34
- 2.0.7
- 5.2
+ 5.6
+ 5.10.0
+ 1.18.42
+ 2.0.17
- 3.1.2
- 3.13.0
- 3.1.0
- 1.7.0
- 2.36.0
- 2.39.0
+ 3.5.5
+ 3.15.0
+ 3.6.3
+ 1.7.1
+ 2.81.0
+ 3.2.0
3.6.3
@@ -88,7 +89,7 @@
org.junit
junit-bom
- 5.9.2
+ ${junit.version}
pom
import
@@ -215,8 +216,6 @@
${cargo-build.target}
--profile
${cargo-build.profile}
- --features
- ${cargo-build.features}
--enable-zigbuild
${cargo-build.enableZigbuild}
@@ -298,7 +297,7 @@
${maven-javadoc-plugin.version}
- Copyright © 2022-2024, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache
+ Copyright © 2022-2026, The Apache Software Foundation. Apache OpenDAL, OpenDAL, and Apache
are either registered trademarks or trademarks of the Apache Software Foundation.
diff --git a/bindings/java/src/executor.rs b/bindings/java/src/executor.rs
index caa8263aead4..e6e305609435 100644
--- a/bindings/java/src/executor.rs
+++ b/bindings/java/src/executor.rs
@@ -28,7 +28,7 @@ use jni::JavaVM;
use jni::objects::JClass;
use jni::objects::JObject;
use jni::objects::JValue;
-use jni::sys::jlong;
+use jni::sys::{jint, jlong};
use tokio::task::JoinHandle;
use crate::Result;
@@ -38,6 +38,12 @@ thread_local! {
static ENV: RefCell