Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion docs/source/java/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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, and 18, but only JDK 11 is tested in CI.

Installing from Maven
---------------------
Expand Down Expand Up @@ -101,6 +101,34 @@ transitive dependencies of Flight.
</build>
</project>

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

For example, when running unit tests through Maven:

.. 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"
Comment on lines +126 to +130
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be configured in pom.xml somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhmm, let me figure out if there are some plugins available, but, initially I could say no way to do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lidavidm, I didn't find a plugin to configure environment variable as needed on the pom.xml directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a exec-maven-plugin but not able to pass argLine needed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sounds good


Installing from Source
----------------------

Expand Down