From 5118c5e5548b93c3461588c0476ca9a196c4554b Mon Sep 17 00:00:00 2001 From: david dali susanibar arce Date: Mon, 25 Apr 2022 13:17:43 -0500 Subject: [PATCH 1/2] Upgrade java documentation for JSE17/JSE18 --- docs/source/java/install.rst | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/source/java/install.rst b/docs/source/java/install.rst index 05b9af22597..4adfe4bdbd3 100644 --- a/docs/source/java/install.rst +++ b/docs/source/java/install.rst @@ -28,7 +28,7 @@ Java modules are regularly built and tested on macOS and Linux distributions. Java Compatibility ------------------ -Java modules are currently compatible with JDK 8, 9, 10, or 11, but only JDK 11 is tested in CI. +Java modules are currently compatible with JDK 8, 9, 10, 11, 17 or 18, but only JDK 11 is tested in CI. Installing from Maven --------------------- @@ -101,6 +101,34 @@ transitive dependencies of Flight. +For users that consume Arrow Java through JSE17/JSE18, please remember to +add modules needed. As an example if you are testing Java Arrow dependencies +and seeing error like `module java.base does not opens java.nio` please +consider to add ``--add-opens=java.base/java.nio=ALL-UNNAMED``. + +Plugin configuration: Just for your test execution created. + +.. code-block:: + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M6 + + --add-opens=java.base/java.nio=ALL-UNNAMED + + + + + +Environment variables: To execute your Arrow Java main code. + +.. code-block:: + + _JAVA_OPTIONS="--add-opens=java.base/java.nio=ALL-UNNAMED" mvn exec:java -Dexec.mainClass="YourMainCode" + Installing from Source ---------------------- From cdac91f6dffeb4c5ae2baa8c063de641a8de7374 Mon Sep 17 00:00:00 2001 From: david dali susanibar arce Date: Mon, 25 Apr 2022 14:31:45 -0500 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: David Li --- docs/source/java/install.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/java/install.rst b/docs/source/java/install.rst index 4adfe4bdbd3..9ff75b9e9e7 100644 --- a/docs/source/java/install.rst +++ b/docs/source/java/install.rst @@ -28,7 +28,7 @@ Java modules are regularly built and tested on macOS and Linux distributions. Java Compatibility ------------------ -Java modules are currently compatible with JDK 8, 9, 10, 11, 17 or 18, but only JDK 11 is tested in CI. +Java modules are currently compatible with JDK 8, 9, 10, 11, 17, and 18, but only JDK 11 is tested in CI. Installing from Maven --------------------- @@ -101,12 +101,12 @@ transitive dependencies of Flight. -For users that consume Arrow Java through JSE17/JSE18, please remember to -add modules needed. As an example if you are testing Java Arrow dependencies -and seeing error like `module java.base does not opens java.nio` please -consider to add ``--add-opens=java.base/java.nio=ALL-UNNAMED``. +When using Java 17 or later, some JDK internals must be exposed by +adding ``--add-opens=java.base/java.nio=ALL-UNNAMED``. Otherwise, +you may see errors like ``module java.base does not "opens +java.nio" to unnamed module``. -Plugin configuration: Just for your test execution created. +For example, when running unit tests through Maven: .. code-block::