JNI javah 未找到 javadoc: 错误 - 找不到类

本文详细介绍了在编译生成.class文件后,如何通过执行特定命令来利用javah工具生成类头文件的过程。

在编译生成  .class 文件后,进入该文件目录 ,执行类似如下命令:

wen@ubuntu:~/workspace/TestCanShu/bin/com/time$ javah -classpath /home/wen/workspace/TestCanShu/bin【包名:如wen@ubuntu:~/workspace/TestCanShu/bin/com/time$ javah -classpath /home/wen/workspace/TestCanShu/bin HelloWorld

HelloWorld


我在ubuntu20.04中输入代码出现问题如下annant@annant-Legion-R7000P-ARH7:~/competition_ws/src/nlopt/build$ cmake .. -- The C compiler identification is GNU 9.4.0 -- The CXX compiler identification is GNU 9.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- NLopt version 2.10.0 -- Looking for getopt.h -- Looking for getopt.h - found -- Looking for unistd.h -- Looking for unistd.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for time.h -- Looking for time.h - found -- Looking for sys/time.h -- Looking for sys/time.h - found -- Looking for getpid -- Looking for getpid - found -- Looking for syscall -- Looking for syscall - found -- Looking for isinf -- Looking for isinf - found -- Looking for isnan -- Looking for isnan - found -- Looking for gettimeofday -- Looking for gettimeofday - found -- Looking for qsort_r -- Looking for qsort_r - found -- Looking for time -- Looking for time - found -- Looking for copysign -- Looking for copysign - found -- Looking for getopt -- Looking for getopt - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of uint32_t -- Check size of uint32_t - done -- Check size of unsigned int -- Check size of unsigned int - done -- Check size of unsigned long -- Check size of unsigned long - done -- Looking for fpclassify -- Looking for fpclassify - TRUE -- Performing Test HAVE_THREAD_LOCAL_STORAGE -- Performing Test HAVE_THREAD_LOCAL_STORAGE - Success -- Performing Test HAVE_THREAD_LOCAL_STORAGE -- Performing Test HAVE_THREAD_LOCAL_STORAGE - Failed -- Found Python: /usr/bin/python3.8 (found suitable version "3.8.10", minimum required is "3.6") found components: Interpreter Development.Module NumPy -- Could NOT find Guile (missing: GUILE_EXECUTABLE GUILE_ROOT_DIR GUILE_INCLUDE_DIRS GUILE_LIBRARIES) -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) -- Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) (Required is at least version "1.5") -- Found SWIG: /usr/bin/swig4.0 (found suitable version "4.0.1", minimum required is "3") -- Could NOT find Octave (missing: OCTAVE_EXECUTABLE OCTAVE_ROOT_DIR OCTAVE_INCLUDE_DIRS OCTAVE_LIBRARIES) -- Configuring done -- Generating done -- Build files have been written to: /home/annant/competition_ws/src/nlopt/build
最新发布
09-05
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值