Open
Description
When enabling Java interface building with Swig (for example with command cmake -DBUILD_INTERFACE_JAVA=ON -S . -B build/release
), the following type of error is obtained:
CMake Error at /opt/homebrew/Cellar/cmake/3.22.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
To fix this, uncomment the lines and make sure that the path to JNI include directories are correct.
#set(JAVA_INCLUDE_PATH "$ENV{JAVA_HOME}/Contents/Home/include")
#set(JAVA_INCLUDE_PATH2 "$ENV{JAVA_HOME}/Contents/Home/include")
#set(JAVA_AWT_INCLUDE_PATH "$ENV{JAVA_HOME}/Contents/Home/include")
in root CMakeLists.txt
. The environment variable $JAVA_HOME must also be properly set.
Metadata
Metadata
Assignees
Labels
No labels