You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/25 19:05:52 UTC

[GitHub] [arrow] lidavidm commented on a diff in pull request #12990: ARROW-16292: [Java][Doc] Upgrade java documentation for JSE17/JSE18

lidavidm commented on code in PR #12990:
URL: https://github.com/apache/arrow/pull/12990#discussion_r857938418


##########
docs/source/java/install.rst:
##########
@@ -101,6 +101,34 @@ transitive dependencies of Flight.
         </build>
     </project>
 
+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``.

Review Comment:
   This is a little vague. What is needed exactly?
   
   ```suggestion
   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``.
   ```



##########
docs/source/java/install.rst:
##########
@@ -101,6 +101,34 @@ transitive dependencies of Flight.
         </build>
     </project>
 
+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.

Review Comment:
   ```suggestion
   For example, when running unit tests through Maven:
   ```



##########
docs/source/java/install.rst:
##########
@@ -101,6 +101,34 @@ transitive dependencies of Flight.
         </build>
     </project>
 
+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::
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>3.0.0-M6</version>
+                <configuration>
+                        <argLine>--add-opens=java.base/java.nio=ALL-UNNAMED</argLine>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+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"

Review Comment:
   Can this be configured in `pom.xml` somehow?



##########
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.

Review Comment:
   ```suggestion
   Java modules are currently compatible with JDK 8, 9, 10, 11, 17, and 18, but only JDK 11 is tested in CI.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org