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/10/13 12:14:02 UTC

[GitHub] [arrow] lidavidm commented on a diff in pull request #14379: ARROW-17882: [Java][Doc] Adding building steps for Windows user to produce JNI DLL

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


##########
docs/source/developers/java/building.rst:
##########
@@ -48,9 +48,10 @@ repository:
     $ git submodule update --init --recursive
 
 These are the options available to compile Arrow Java modules with:
-- Maven build tool
-- Docker compose
-- Archery
+
+* Maven build tool.
+* Docker compose.

Review Comment:
   ```suggestion
   * Docker Compose.
   ```



##########
docs/source/developers/java/building.rst:
##########
@@ -87,67 +88,111 @@ Archery
     $ java --version
     $ archery docker run debian-java
 
-Building JNI Libraries (.dylib / .so)
--------------------------------------
+Building JNI Libraries (*.dylib / *.so / *.dll)
+-----------------------------------------------
 
 First, we need to build the `C++ shared libraries`_ that the JNI bindings will use.
 We can build these manually or we can use `Archery`_ to build them using a Docker container
 (This will require installing Docker, Docker Compose, and Archery).
 
-Note: If you are building on Apple Silicon, be sure to use a JDK version that was compiled
-for that architecture. See, for example, the `Azul JDK <https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk>`_.
+.. note::
+   If you are building on Apple Silicon, be sure to use a JDK version that was compiled
+   for that architecture. See, for example, the `Azul JDK <https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk>`_.
+
+   If you are building on Windows OS, consider to read :ref:`Developing on Windows <developers-cpp-windows>`.
 
 Maven
 ~~~~~
 
-- To build only the JNI C Data Interface library:
+- To build only the JNI C Data Interface library (MacOS / Linux):
 
     .. code-block::
 
         $ cd arrow/java
         $ export JAVA_HOME=<absolute path to your java home>
         $ java --version
-        $ mvn clean generate-resources -Pgenerate-cdata-dylib_so -N
+        $ mvn generate-resources -Pgenerate-libs-cdata-all-os -N
         $ ls -latr ../java-dist/lib
         |__ libarrow_cdata_jni.dylib
+        |__ libarrow_cdata_jni.so
+
+- To build only the JNI C Data Interface library (Windows):
+
+    .. code-block::
+
+        C:\ cd arrow/java

Review Comment:
   The prompt is a little confusing, especially since it doesn't change after cd. Maybe just keep the usual prompt?



##########
docs/source/developers/java/building.rst:
##########
@@ -87,67 +88,111 @@ Archery
     $ java --version
     $ archery docker run debian-java
 
-Building JNI Libraries (.dylib / .so)
--------------------------------------
+Building JNI Libraries (*.dylib / *.so / *.dll)

Review Comment:
   Does this render properly? You might need to escape one of the asterisks?



##########
docs/source/developers/java/building.rst:
##########
@@ -87,67 +88,111 @@ Archery
     $ java --version
     $ archery docker run debian-java
 
-Building JNI Libraries (.dylib / .so)
--------------------------------------
+Building JNI Libraries (*.dylib / *.so / *.dll)
+-----------------------------------------------
 
 First, we need to build the `C++ shared libraries`_ that the JNI bindings will use.
 We can build these manually or we can use `Archery`_ to build them using a Docker container
 (This will require installing Docker, Docker Compose, and Archery).
 
-Note: If you are building on Apple Silicon, be sure to use a JDK version that was compiled
-for that architecture. See, for example, the `Azul JDK <https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk>`_.
+.. note::
+   If you are building on Apple Silicon, be sure to use a JDK version that was compiled
+   for that architecture. See, for example, the `Azul JDK <https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk>`_.
+
+   If you are building on Windows OS, consider to read :ref:`Developing on Windows <developers-cpp-windows>`.
 
 Maven
 ~~~~~
 
-- To build only the JNI C Data Interface library:
+- To build only the JNI C Data Interface library (MacOS / Linux):
 
     .. code-block::
 
         $ cd arrow/java
         $ export JAVA_HOME=<absolute path to your java home>
         $ java --version
-        $ mvn clean generate-resources -Pgenerate-cdata-dylib_so -N
+        $ mvn generate-resources -Pgenerate-libs-cdata-all-os -N
         $ ls -latr ../java-dist/lib
         |__ libarrow_cdata_jni.dylib
+        |__ libarrow_cdata_jni.so
+
+- To build only the JNI C Data Interface library (Windows):
+
+    .. code-block::
+
+        C:\ cd arrow/java
+        C:\ java --version
+        C:\ mvn generate-resources -Pgenerate-libs-cdata-all-os -N
+        C:\ dir "../java-dist/bin"
+        |__ arrow_cdata_jni.dll
 
-- To build all JNI libraries except the JNI C Data Interface library:
+- To build all JNI libraries (MacOS / Linux) except the JNI C Data Interface library:
 
     .. code-block::
 
         $ cd arrow/java
         $ export JAVA_HOME=<absolute path to your java home>
         $ java --version
-        $ mvn clean generate-resources -Pgenerate-jni-dylib_so -N
+        $ mvn generate-resources -Pgenerate-libs-jni-macos-linux -N
         $ ls -latr java-dist/lib/*_{jni,java}.*
         |__ libarrow_dataset_jni.dylib
         |__ libarrow_orc_jni.dylib
         |__ libgandiva_jni.dylib
         |__ libplasma_java.dylib
 
+- To build all JNI libraries (Windows) except the JNI C Data Interface library:
+
+    .. code-block::
+
+        C:\ cd arrow/java
+        C:\ java --version

Review Comment:
   ```suggestion
   ```



##########
docs/source/developers/java/development.rst:
##########
@@ -81,6 +81,15 @@ UI Benchmark:
 
 .. image:: img/conbench_benchmark.png
 
+Integration Testing
+===================
+
+Integration testing are run by archery:

Review Comment:
   ```suggestion
   Integration tests can be run via Archery:
   ```



##########
docs/source/developers/java/building.rst:
##########
@@ -197,6 +242,55 @@ CMake
         |__ libgandiva_jni.dylib
         |__ libplasma_java.dylib
 
+- To build all JNI libraries (Windows) except the JNI C Data Interface library
+(Please note: Plasma doesn't work on Windows / ORC isn't available on Windows):

Review Comment:
   ```suggestion
     (Please note: Plasma and ORC are not available on Windows):
   ```



##########
docs/source/developers/java/building.rst:
##########
@@ -87,67 +88,111 @@ Archery
     $ java --version
     $ archery docker run debian-java
 
-Building JNI Libraries (.dylib / .so)
--------------------------------------
+Building JNI Libraries (*.dylib / *.so / *.dll)
+-----------------------------------------------
 
 First, we need to build the `C++ shared libraries`_ that the JNI bindings will use.
 We can build these manually or we can use `Archery`_ to build them using a Docker container
 (This will require installing Docker, Docker Compose, and Archery).
 
-Note: If you are building on Apple Silicon, be sure to use a JDK version that was compiled
-for that architecture. See, for example, the `Azul JDK <https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk>`_.
+.. note::
+   If you are building on Apple Silicon, be sure to use a JDK version that was compiled
+   for that architecture. See, for example, the `Azul JDK <https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk>`_.
+
+   If you are building on Windows OS, consider to read :ref:`Developing on Windows <developers-cpp-windows>`.
 
 Maven
 ~~~~~
 
-- To build only the JNI C Data Interface library:
+- To build only the JNI C Data Interface library (MacOS / Linux):
 
     .. code-block::
 
         $ cd arrow/java
         $ export JAVA_HOME=<absolute path to your java home>
         $ java --version
-        $ mvn clean generate-resources -Pgenerate-cdata-dylib_so -N
+        $ mvn generate-resources -Pgenerate-libs-cdata-all-os -N
         $ ls -latr ../java-dist/lib
         |__ libarrow_cdata_jni.dylib
+        |__ libarrow_cdata_jni.so
+
+- To build only the JNI C Data Interface library (Windows):
+
+    .. code-block::
+
+        C:\ cd arrow/java
+        C:\ java --version

Review Comment:
   ```suggestion
   ```



##########
docs/source/developers/java/building.rst:
##########
@@ -87,67 +88,111 @@ Archery
     $ java --version
     $ archery docker run debian-java
 
-Building JNI Libraries (.dylib / .so)
--------------------------------------
+Building JNI Libraries (*.dylib / *.so / *.dll)
+-----------------------------------------------
 
 First, we need to build the `C++ shared libraries`_ that the JNI bindings will use.
 We can build these manually or we can use `Archery`_ to build them using a Docker container
 (This will require installing Docker, Docker Compose, and Archery).
 
-Note: If you are building on Apple Silicon, be sure to use a JDK version that was compiled
-for that architecture. See, for example, the `Azul JDK <https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk>`_.
+.. note::
+   If you are building on Apple Silicon, be sure to use a JDK version that was compiled
+   for that architecture. See, for example, the `Azul JDK <https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk>`_.
+
+   If you are building on Windows OS, consider to read :ref:`Developing on Windows <developers-cpp-windows>`.

Review Comment:
   ```suggestion
      If you are building on Windows OS, see :ref:`Developing on Windows <developers-cpp-windows>`.
   ```



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