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.
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:To fix this, uncomment the lines and make sure that the path to JNI include directories are correct.
in root
CMakeLists.txt
. The environment variable $JAVA_HOME must also be properly set.