diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 653b16fa32..c426f392d6 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -45,8 +45,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- jdk: [17, 21, 23]
- maven: [3.9.9]
+ jdk: [17, 21, 25]
+ maven: [3.9.16]
image: [ubuntu, conda-jni-cdata]
include:
- image: ubuntu
diff --git a/adapter/avro/src/main/java/org/apache/arrow/adapter/avro/ArrowToAvroUtils.java b/adapter/avro/src/main/java/org/apache/arrow/adapter/avro/ArrowToAvroUtils.java
index e09b99f670..bdbf9c2173 100644
--- a/adapter/avro/src/main/java/org/apache/arrow/adapter/avro/ArrowToAvroUtils.java
+++ b/adapter/avro/src/main/java/org/apache/arrow/adapter/avro/ArrowToAvroUtils.java
@@ -601,7 +601,7 @@ private static BaseAvroProducer> createProducer(
case VARCHAR:
return new AvroStringProducer((VarCharVector) vector);
- // Logical types
+ // Logical types
case DECIMAL:
return new AvroDecimalProducer((DecimalVector) vector);
@@ -636,7 +636,7 @@ private static BaseAvroProducer> createProducer(
case TIMESTAMPNANOTZ:
return new AvroTimestampNanoTzProducer((TimeStampNanoTZVector) vector);
- // Complex types
+ // Complex types
case STRUCT:
StructVector structVector = (StructVector) vector;
@@ -679,9 +679,9 @@ private static BaseAvroProducer> createProducer(
new AvroStructProducer(entryVector, new Producer>[] {keyProducer, valueProducer});
return new AvroMapProducer(mapVector, entryProducer);
- // Support for UNION and DENSEUNION is not currently available
- // This is pending fixes in the implementation of the union vectors themselves
- // https://github.com/apache/arrow-java/issues/108
+ // Support for UNION and DENSEUNION is not currently available
+ // This is pending fixes in the implementation of the union vectors themselves
+ // https://github.com/apache/arrow-java/issues/108
default:
// Not all Arrow types are supported for encoding (yet)!
diff --git a/adapter/jdbc/pom.xml b/adapter/jdbc/pom.xml
index a8ac19721d..19a987d74c 100644
--- a/adapter/jdbc/pom.xml
+++ b/adapter/jdbc/pom.xml
@@ -32,6 +32,10 @@ under the License.
(Contrib/Experimental)A library for converting JDBC data to Arrow data.
http://maven.apache.org
+
+ --add-reads=org.apache.arrow.adapter.jdbc=com.fasterxml.jackson.dataformat.yaml
+
+
@@ -109,13 +113,6 @@ under the License.
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
- --add-reads=org.apache.arrow.adapter.jdbc=com.fasterxml.jackson.dataformat.yaml --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED -Duser.timezone=UTC
-
-
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/dataset/pom.xml b/dataset/pom.xml
index 5acc837860..47b5080734 100644
--- a/dataset/pom.xml
+++ b/dataset/pom.xml
@@ -31,6 +31,7 @@ under the License.
Java implementation of Arrow Dataset API/Framework
+ --add-reads=org.apache.arrow.dataset=com.fasterxml.jackson.databind --add-opens=java.base/java.nio=org.apache.arrow.dataset
../../../cpp/release-build/
1.17.1
1.12.1
@@ -180,7 +181,6 @@ under the License.
maven-surefire-plugin
- --add-reads=org.apache.arrow.dataset=com.fasterxml.jackson.databind --add-opens=java.base/java.nio=org.apache.arrow.dataset,org.apache.arrow.memory.core,ALL-UNNAMED
false
${project.basedir}/../testing/data
diff --git a/docs/source/install.rst b/docs/source/install.rst
index e0b34515ef..904b004995 100644
--- a/docs/source/install.rst
+++ b/docs/source/install.rst
@@ -28,10 +28,13 @@ Java Compatibility
==================
Java modules are compatible with JDK 17 and above. Currently, JDK versions
-17, 21, and latest are tested in CI.
+17, 21, and 25 are tested in CI.
-Note that some JDK internals must be exposed by
-adding ``--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED`` to the ``java`` command:
+Note that some JDK internals must be exposed by adding these flags to the ``java`` command:
+
+- ``--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED`` (always required)
+- ``--enable-native-access=io.netty.common`` (Java 25+, when using ``arrow-memory-netty``)
+- ``--sun-misc-unsafe-memory-access=allow`` (Java 25+; not stricly necessary, but suppresses certain warnings)
.. code-block:: shell
@@ -40,14 +43,19 @@ adding ``--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
# Indirectly via environment variables
$ env JDK_JAVA_OPTIONS="--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED" java -jar ...
-Otherwise, you may see errors like ``module java.base does not "opens
-java.nio" to unnamed module`` or ``module java.base does not "opens
-java.nio" to org.apache.arrow.memory.core``
+Otherwise, you may see errors and/or warnings like these:
+- ``module java.base does not "opens java.nio" to unnamed module``
+- ``module java.base does not "opens java.nio" to org.apache.arrow.memory.core``
+- ``Native access (restricted methods) is not enabled for the io.netty.common module.``
+- ``A terminally deprecated method in sun.misc.Unsafe has been called``
Note that the command has changed from Arrow 15 and earlier. If you are still using the flags from that version
(``--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED``) you will see the
``module java.base does not "opens java.nio" to org.apache.arrow.memory.core`` error.
+For more information on these flags, see the `Netty documentation
+`_.
+
If you are using flight-core or dependent modules, you will need to mark that flight-core can read unnamed modules.
Modifying the command above for Flight:
diff --git a/flight/flight-core/pom.xml b/flight/flight-core/pom.xml
index d07a4ef0fe..8228cd67c0 100644
--- a/flight/flight-core/pom.xml
+++ b/flight/flight-core/pom.xml
@@ -32,8 +32,7 @@ under the License.
1
-
- --add-opens=org.apache.arrow.flight.core/org.apache.arrow.flight.perf.impl=protobuf.java --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
+ --add-opens=org.apache.arrow.flight.core/org.apache.arrow.flight.perf.impl=protobuf.java
@@ -152,7 +151,6 @@ under the License.
maven-surefire-plugin
- --add-opens=org.apache.arrow.flight.core/org.apache.arrow.flight.perf.impl=protobuf.java --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
false
${project.basedir}/../../testing/data
diff --git a/flight/flight-sql/pom.xml b/flight/flight-sql/pom.xml
index b7c8931391..ec80d7c3a0 100644
--- a/flight/flight-sql/pom.xml
+++ b/flight/flight-sql/pom.xml
@@ -32,8 +32,7 @@ under the License.
1
-
- --add-reads=org.apache.arrow.flight.sql=org.slf4j --add-reads=org.apache.arrow.flight.core=ALL-UNNAMED --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
+ --add-reads=org.apache.arrow.flight.sql=org.slf4j --add-reads=org.apache.arrow.flight.core=ALL-UNNAMED
diff --git a/memory/memory-core/pom.xml b/memory/memory-core/pom.xml
index 825b3dae4b..f047999070 100644
--- a/memory/memory-core/pom.xml
+++ b/memory/memory-core/pom.xml
@@ -31,8 +31,7 @@ under the License.
Core off-heap memory management libraries for Arrow ValueVectors.
-
- --add-reads=org.apache.arrow.memory.core=ch.qos.logback.classic --add-opens=java.base/java.lang.reflect=org.apache.arrow.memory.core --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
+ --add-reads=org.apache.arrow.memory.core=ch.qos.logback.classic --add-opens=java.base/java.lang.reflect=org.apache.arrow.memory.core
@@ -84,7 +83,6 @@ under the License.
org.apache.maven.plugins
maven-surefire-plugin
- --add-reads=org.apache.arrow.memory.core=ch.qos.logback.classic --add-opens=java.base/java.lang.reflect=org.apache.arrow.memory.core --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
**/TestOpens.java
diff --git a/pom.xml b/pom.xml
index bee28e2a97..9ed3fbb760 100644
--- a/pom.xml
+++ b/pom.xml
@@ -116,8 +116,9 @@ under the License.
1.6.3
none
-Xdoclint:none
-
- --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED
+
+
+ --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED --enable-native-access=io.netty.common ${surefire.argLine.extend} ${surefire.argLine.jdkSpecific}
17
17
@@ -322,7 +323,7 @@ under the License.
maven-surefire-plugin
- ${surefire.add-opens.argLine}
+ ${surefire.argLine}
true
true
${forkCount}
@@ -341,7 +342,7 @@ under the License.
maven-failsafe-plugin
- ${surefire.add-opens.argLine}
+ ${surefire.argLine}
${project.build.directory}
true
@@ -725,42 +726,6 @@ under the License.
org.apache.maven.plugins
maven-site-plugin
-
- com.diffplug.spotless
- spotless-maven-plugin
-
-
-
- ${maven.multiModuleProjectDirectory}/dev/license/asf-xml.license
- (<configuration|<project)
-
-
-
-
-
- 1.17.0
-
-
-
- ${maven.multiModuleProjectDirectory}/dev/license/asf-java.license
- package
-
-
- **/Preconditions.java
- **/IntObjectMap.java
- **/IntObjectHashMap.java
-
-
-
-
-
- spotless-check
-
- check
-
-
-
-
@@ -814,6 +779,17 @@ under the License.
+
+
+ jdk24
+
+ [24,)
+
+
+ --sun-misc-unsafe-memory-access=allow
+
+
+
arrow-c-data
@@ -842,6 +818,54 @@ under the License.
+
+
+ spotless
+
+ [21,)
+
+
+
+
+ com.diffplug.spotless
+ spotless-maven-plugin
+
+
+
+ ${maven.multiModuleProjectDirectory}/dev/license/asf-xml.license
+ (<configuration|<project)
+
+
+
+
+
+ 1.36.1
+
+
+
+ ${maven.multiModuleProjectDirectory}/dev/license/asf-java.license
+ package
+
+
+ **/Preconditions.java
+ **/IntObjectMap.java
+ **/IntObjectHashMap.java
+
+
+
+
+
+ spotless-check
+
+ check
+
+
+
+
+
+
+
+