Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java interface error for INCLUDE PATH when configuring #83

Open
ctribes opened this issue Jul 20, 2022 · 0 comments
Open

Java interface error for INCLUDE PATH when configuring #83

ctribes opened this issue Jul 20, 2022 · 0 comments

Comments

@ctribes
Copy link
Contributor

ctribes commented Jul 20, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant