NAME
javah - C header and stub file generator
SYNOPSIS
javah [ -classpath path ] [ -d directory ] [ -help ]
[ -jni ] [ -o outputfile ] [ -stubs ] [ -td directory ]
[ -trace ] [ -v ] [ -version ] classname . . .
DESCRIPTION
The javah command generates C header and source files that
are needed to implement native methods. The generated
header and source files are used by C programs to reference
instance variables of an object from native source code.
The .h file contains a structure definition whose layout
parallels that of the corresponding class. The fields in
the structure correspond to instance variables in the class.
The name of the header file and the structure declared
within it are derived from the name of the class. If the
class passed to javah is inside a package, the package name
is prepended to both the header file name and the structure
name. Underscores ( _ ) are used as name delimiters.
By default, javah creates a header file for each class
listed on the command line and puts the files in the current
directory. Use the -stubs option to create source files.
Use the -o option to concatenate the results for all listed
classes into a single file.
The new native method interface, Java Native Interface
(JNI), does not require header information or stub files.
The javah command can still be used with the -jni option to
generate native method function prototypes needed for JNI-
style native methods. The result is placed in the .h file.
OPTIONS
The following options are supported:
-classpath path Specifies the path javah uses to look up
classes. Overrides the default of the
CLASSPATH environment variable if it is
set. Directories are separated by colons.
Thus the general format for path is:
.:<your_path>
For example:
.:/home/avh/classes:/usr/local/java/classes
-d directory Sets the directory where javah saves the
header files or the stub files.
-help Prints help message.
-jni Causes javah to create an output file con-
taining JNI-style native method function
prototypes.
-o outputfile Concatenates the resulting header or
source files for all the classes listed on
the command line into outputfile.
-stubs Causes javah to generate C declarations
from the Java object file.
-td directory Overrides the default directory where
javah stores temporary files. The default
is /tmp.
-trace Adds tracing information to the stubs
file.
-v Indicates verbose output and causes javah
to print a message to stdout concerning
the status of the generated files.
-version Prints build version.
ENVIRONMENT VARIABLES
CLASSPATH Used to provide the system with a path to
user-defined classes. Directories are
separated by colons, for example,
.:/home/avh/classes:/usr/local/java/classes
ATTRIBUTES
See attributes(5) for a description of the following attri-
butes:
__________________________________
| ATTRIBUTE TYPE| ATTRIBUTE VALUE|
|_______________|__________________|_
| Availability | SUNWjvdev |
|_______________|_________________|
SEE ALSO
java(1), javac(1), javadoc(1), javap(1), jdb(1), attri-
butes(5)
|
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |