cmake error: could not find JNI

asked 2018-03-31 10:37:31 -0500

anonymous user


updated 2018-03-31 10:50:10 -0500

Linux 16.04 LTS ROS Kinetic


Put tango_ros_messages from tango_ros_streamer package into catkin_ws/src as instructed by teacher. This folder has its own package.xml and CMakeLists.txt so should be fine.


Trying to use the tango_ros_messages/save_map service:

$ rosservice list

returns available service:


But trying out the following:

$ rosservice info /tango/save_map


ERROR: Unable to load type [tango_ros_messages/SaveMap]

Have you typed 'make' in [tango_ros_messages] ?


~catkin_ws/$ catkin_make


CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148(message): Could Not find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)


~/catking_ws/src/tango_ros_messages$ make


make: * No targets specified and no makefile found. Stop.

Search results

The answers I found at:

However, these do not help me as I'm unable to understand their responses. Furhtermore, as someone put it in the last link:

" I did a websearch for “Could NOT find JNI” cmake FindPackageHandleStandardArgs and this (and similar searches) brings hundreds of results, but only some strange bug reports and build logs without any explaination or solution…"

What is the cause of this error / How do I resolve it or avoid it? Thank you.

edit retag flag offensive close merge delete