
如何从 Java 使用 JNI 调用本机 的代码
2017-09-09
展开全部
生成 JAVA的类,包括定义有包,,,,,然后 javah生成c的头文件,实现方法
Usage:
javah [options] <classes>
where [options] include:
-o <file> Output file (only one of -d or -o may be used)
-d <dir> Output directory
-v -verbose Enable verbose output
-h --help -? Print this message
-version Print version information
-jni Generate JNI-style header file (default)
-force Always write output files
-classpath <path> Path from which to load classes
-bootclasspath <path> Path from which to load bootstrap classes
<classes> are specified with their fully qualified names
(for example, java.lang.Object).
Usage:
javah [options] <classes>
where [options] include:
-o <file> Output file (only one of -d or -o may be used)
-d <dir> Output directory
-v -verbose Enable verbose output
-h --help -? Print this message
-version Print version information
-jni Generate JNI-style header file (default)
-force Always write output files
-classpath <path> Path from which to load classes
-bootclasspath <path> Path from which to load bootstrap classes
<classes> are specified with their fully qualified names
(for example, java.lang.Object).
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询