0

The C++ static analyser https://github.com/animatedb/oovaide is written in Java. Attempting to build it from source, I encounter the following basic Java configuration problem:

CMake reports

CMake Error at /usr/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Java (missing: Java_JAR_EXECUTABLE Java_JAVADOC_EXECUTABLE)
  (found version "11")
Call Stack (most recent call first):
  /usr/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.11/Modules/FindJava.cmake:332 (find_package_handle_standard_args)
  oovJavaParser/CMakeLists.txt:5 (find_package)

Which Debian package provides these dependencies?

I installed openjdk-11-jre, which provides /usr/lib/jvm/java-11-openjdk-amd64/bin/java, which can be called as /usr/bin/java thanks to /etc/alternatives.

Joachim W
  • 7,290
  • 5
  • 31
  • 59

1 Answers1

2

Besides openjdk-11-jre, also openjdk-11-jdk is needed.

Upon which CMake came up with the next error:

Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)

Which could be solved with export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64, as suggested by https://stackoverflow.com/a/19202688/1017348.

Joachim W
  • 7,290
  • 5
  • 31
  • 59