Name
javah — Native Method C Stub Generator
Synopsis
javah [options]classnames
Description
javah generates C
header and source files
(.h and .c files) that are
used when implementing Java native methods in C. The preferred native
method interface changed between Java 1.0 and Java 1.1. In Java 1.1
and earlier, javah generated files for old-style
native methods. In Java 1.1, the -jni option
specified that javah should generate new-style
files. In Java 1.2 and later, this option is the default.
This section describes only how to use javah. A full description of how to implement Java native methods in C is beyond the scope of this book.
Options
-
-bootclasspath Specifies the path to search for system classes. See javac for further discussion. Java 1.2 and later.
-
-classpathpath Specifies the path javah uses to look up the classes named on the command line. This option overrides any path specified by the
CLASSPATHenvironment variable. Prior to Java 1.2, this option can specify the location of the system classes and extensions. In Java 1.2 and later, it specifies only the location of application classes. See-bootclasspath. See also java for further discussion of the classpath.-
-ddirectory Specifies the directory into which javah stores the files it generates. By default, it stores them in the current directory. This option cannot be used with
-o.-
-force Causes javah to always write output files, even if they contain no useful content.
-
-help Causes javah to display a simple usage ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access