Class Javah

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.optional.Javah
All Implemented Interfaces:
Cloneable

public class Javah extends Task
Generates JNI header files using javah. This task can take the following arguments:
  • classname - the fully-qualified name of a class
  • outputFile - Concatenates the resulting header or source files for all the classes listed into this file
  • destdir - Sets the directory where javah saves the header files or the stub files
  • classpath
  • bootclasspath
  • force - Specifies that output files should always be written (JDK1.2 only)
  • old - Specifies that old JDK1.0-style header files should be generated (otherwise output file contain JNI-style native method function prototypes) (JDK1.2 only)
  • stubs - generate C declarations from the Java object file (used with old)
  • verbose - causes javah to print a message to stdout concerning the status of the generated files
  • extdirs - Override location of installed extensions
Of these arguments, either outputFile or destdir is required, but not both. More than one classname may be specified, using a comma-separated list or by using <class name="xxx"> elements within the task.

When this task executes, it will generate C header and source files that are needed to implement native methods.