我正在尝试用 cmake 构建一个项目。这个项目正在使用java等等。问题是在代码
find_package(Java REQUIRED)
我收到以下错误:
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108
(message):
Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE
Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-2.8/Modules/FindJava.cmake:195 (find_package_handle_standard_args)
CMakeLists.txt:66 (find_package)
尽管
which java
输出
/usr/bin/java
怎么来的?这个错误的原因是什么?