CMake Error: Could NOT find JNI (missing: JAVA_INCLUDE_PATH2)

Posted on

this error suddenly popped up after upgrading to Mac OSX 10.10. after a long time searching for a solution I found out that cmake already fixed this with CMake 3.0+ (I was using 2.8-something):

the error looked something like this:

CMake Error at             target/dependency/cmake/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
        Could NOT find JNI (missing: JAVA_INCLUDE_PATH2)

a workaround would be to add the following lines to your CMakeLists.txt:


because cmake 3.0+ currently doesn’t build using homebrew on OS X 10.10

Incoming search terms:

  • debian cmake Could NOT find JNI (missing: JAVA_INCLUDE_PATH2

Leave a Reply

Your email address will not be published. Required fields are marked *