cmake: use javac -h for creating JNI native headers
JDK 1.10 does not offer javah anymore, so we need to use "javac -h" or
add_jar(... GENERATE_NATIVE_HEADERS) instead.
Fixes: http://tracker.ceph.com/issues/24012
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
edc504b9d446cc1739f3e8e087914cfe66d6cac3)
Conflicts:
src/java/CMakeLists.txt: in master, we dropped the support for
trusty, but luminous still supports trusty. while trusty ships JDK-7,
where javac does not support "-h" option yet. so we need to handle this
case. "-h" was introduced in Java SE 8, see
https://docs.oracle.com/javase/8/docs/technotes/guides/javac/index.html
.