C ++静态分析器https://github.com/animatedb/oovaide用Java编写。尝试从源代码构建它,我遇到以下基本Java配置问题:
CMake报告
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)
哪个Debian软件包提供了这些依赖关系?
我安装了openjdk-11-jre
,它提供了/usr/lib/jvm/java-11-openjdk-amd64/bin/java
,由于/usr/bin/java
可以称为/etc/alternatives
。
答案 0 :(得分:0)
除了openjdk-11-jre
之外,还需要openjdk-11-jdk
。
哪个CMake
出现下一个错误:
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
https://stackoverflow.com/a/19202688/1017348建议使用export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
来解决。