libzt
libzt copied to clipboard
Java: Could NOT find JNI
-- Looking for JNI CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find JNI (missing: JAVA_INCLUDE_PATH) Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.22/Modules/FindJNI.cmake:382 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:475 (find_package)
When I try ./build.sh host-jar, it reports this exception, how can I fix it ? I've searched a lot of workarounds but to no avail.
You'll need to install the JDK to build against. For instance on my Linux machine I have to apt install openjdk-11-jdk
. Perhaps I should add this to the documentation. Thanks.