zhztheplayer commented on pull request #7030: URL: https://github.com/apache/arrow/pull/7030#issuecomment-700390598
Hi @Sebastiaan-Alvarez-Rodriguez , First of all, thanks for the detailed explanation about the issue and your suggestions. Sorry for the late reply. Actually I don't mind to change approach from `System.load` to `System.loadLibrary` as long as it too works fine or even better. I am just worried about why `getResourceAsStream` returns null in your case. Just saw your practice on compiling Java code: > cd <project-root>/java/dataset > mvn clean install -Dmaven.test.skip=true # skipping tests to let build succeed Have you checked if arrow_dataset_jni.so was successfully installed within the jar `arrow-dataset-XXX.jar`? If not, specifying `arrow.cpp.build.dir` may helps. > Maybe it is a good idea to pick one of the following: > 1. Change the 'java.io.FileNotFoundException: libarrow_dataset_jni.so' to display the full path (so people know where your library > looks to find the shared object) > 2. Make a small JNI_dataset_dev_install_note.md somewhere on getting this library to work. > 3. Use System.loadLibrary(libraryToLoad); > 4. Use some other way to find the location of a shared library and copy it to a tmpfile I did a little try and it appears that `System.loadLibrary` requires for property `java.library.path` to be set to include library locations. If we change to use this way, do users have to do this every time before getting started? I may intend to pick option 1 here. While we should iterate on multiple resource path roots and display several possible paths to let users find in. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org