Microsoft SDK for Java

Javah Options

This section describes the command-line options that can be used with javah.

-classpath <path>

Specifies the path javah uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set. Directories are separated by semi-colons. The general format for path is:

.;<your_path>

For example:

.;C:\users\dac\classes;C:\tools\java\classes

-d <directory>

Specifies the directory where javah saves the header or stub files.

-help

Prints out the options.

-jni

Creates an output file containing JNI-style native method function prototypes.

-o <output file>

Concatenates the resulting header or source files for all the classes listed on the command line into the specified output file.

-stubs

Causes javah to generate C declarations from the Java object file.

-td <directory>

Specifies the directory where javah stores temporary files. By default, javah stores temporary files in the directory specified by the %TEMP% environment variable. If %TEMP% is unspecified, then javah checks for a %TMP% environment variable. If %TMP% is unspecified, javah creates the directory C:\tmp and stores the files there.

-trace

Adds tracing information to stubbs file.

-version

Prints out the build version.

-v

Prints a message to standard output concerning the status of the generated files.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.