cmake error: could not find JNI
Linux 16.04 LTS ROS Kinetic
context
Put tangorosmessages from tangorosstreamer package into catkin_ws/src as instructed by teacher. This folder has its own package.xml and CMakeLists.txt so should be fine.
problem
Trying to use the tangorosmessages/save_map service:
$ rosservice list
returns available service:
/tango/save_map
But trying out the following:
$ rosservice info /tango/save_map
returns:
ERROR: Unable to load type [tangorosmessages/SaveMap]
Have you typed 'make' in [tangorosmessages] ?
Trying:
~catkinws/$ catkinmake
returns:
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148(message): Could Not find JNI (missing: JAVAAWTLIBRARY JAVAJVMLIBRARY JAVAINCLUDEPATH JAVAINCLUDEPATH2 JAVAAWTINCLUDE_PATH)
Trying:
~/catkingws/src/tangoros_messages$ make
returns:
make: *** No targets specified and no makefile found. Stop.
Search results
The answers I found at:
https://stackoverflow.com/questions/17636166/cmake-find-packagejni-not-work-in-ubuntu-12-04-amd64
https://github.com/zeromq/jzmq/issues/332
https://forum.byte-welt.net/t/could-not-find-jni-missing-java-awt-library-java-jvm-library/3570/5
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.
Asked by anonymous32749 on 2018-03-31 10:37:31 UTC
Comments