zerotier / libzt

Encrypted P2P sockets over ZeroTier

Home Page:https://zerotier.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java: Could NOT find JNI

3305325552 opened this issue · comments

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