author | duke |
Wed, 05 Jul 2017 20:53:25 +0200 | |
changeset 32954 | 7db0663a5e96 |
parent 31876 | 91b22707521a |
permissions | -rw-r--r-- |
21743 | 1 |
'\" t |
31876
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
2 |
.\" Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
3 |
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
4 |
.\" |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
5 |
.\" This code is free software; you can redistribute it and/or modify it |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
6 |
.\" under the terms of the GNU General Public License version 2 only, as |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
7 |
.\" published by the Free Software Foundation. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
8 |
.\" |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
9 |
.\" This code is distributed in the hope that it will be useful, but WITHOUT |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
10 |
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
11 |
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
12 |
.\" version 2 for more details (a copy is included in the LICENSE file that |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
13 |
.\" accompanied this code). |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
14 |
.\" |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
15 |
.\" You should have received a copy of the GNU General Public License version |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
16 |
.\" 2 along with this work; if not, write to the Free Software Foundation, |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
17 |
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
18 |
.\" |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
19 |
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
20 |
.\" or visit www.oracle.com if you need additional information or have any |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
21 |
.\" questions. |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
22 |
.\" |
21743 | 23 |
.\" Arch: generic |
24 |
.\" Software: JDK 8 |
|
25 |
.\" Date: 21 November 2013 |
|
26 |
.\" SectDesc: Basic Tools |
|
27 |
.\" Title: javah.1 |
|
28 |
.\" |
|
29 |
.if n .pl 99999 |
|
30 |
.TH javah 1 "21 November 2013" "JDK 8" "Basic Tools" |
|
31876
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
31 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
32 |
.\" * Define some portability stuff |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
33 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
34 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
35 |
.\" http://bugs.debian.org/507673 |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
36 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
37 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
38 |
.ie \n(.g .ds Aq \(aq |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
39 |
.el .ds Aq ' |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
40 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
41 |
.\" * set default formatting |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
42 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
43 |
.\" disable hyphenation |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
44 |
.nh |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
45 |
.\" disable justification (adjust text to left margin only) |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
46 |
.ad l |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
47 |
.\" ----------------------------------------------------------------- |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
48 |
.\" * MAIN CONTENT STARTS HERE * |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
49 |
.\" ----------------------------------------------------------------- |
2 | 50 |
|
21743 | 51 |
.SH NAME |
52 |
javah \- Generates C header and source files from a Java class\&. |
|
53 |
.SH SYNOPSIS |
|
54 |
.sp |
|
55 |
.nf |
|
2 | 56 |
|
21743 | 57 |
\fBjavah\fR [ \fIoptions\fR ] f\fIully\-qualified\-class\-name \&.\&.\&.\fR |
58 |
.fi |
|
59 |
.sp |
|
60 |
.TP |
|
61 |
\fIoptions\fR |
|
62 |
The command-line options\&. See Options\&. |
|
63 |
.TP |
|
64 |
\fIfully-qualified-class-name\fR |
|
65 |
The fully qualified location of the classes to be converted to C header and source files\&. |
|
66 |
.SH DESCRIPTION |
|
67 |
The \f3javah\fR 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 an object\&'s instance variables from native source code\&. The \f3\&.h\fR file contains a \f3struct\fR definition with a layout that parallels the layout of the corresponding class\&. The fields in the \f3struct\fR correspond to instance variables in the class\&. |
|
68 |
.PP |
|
69 |
The name of the header file and the structure declared within it are derived from the name of the class\&. When the class passed to the \f3javah\fR command is inside a package, the package name is added to the beginning of both the header file name and the structure name\&. Underscores (_) are used as name delimiters\&. |
|
70 |
.PP |
|
71 |
By default the \f3javah\fR command creates a header file for each class listed on the command line and puts the files in the current directory\&. Use the \f3-stubs\fR option to create source files\&. Use the \f3-o\fR option to concatenate the results for all listed classes into a single file\&. |
|
72 |
.PP |
|
73 |
The Java Native Interface (JNI) does not require header information or stub files\&. The \f3javah\fR command can still be used to generate native method function prototypes needed for JNI-style native methods\&. The \f3javah\fR command produces JNI-style output by default and places the result in the \f3\&.h\fR file\&. |
|
74 |
.SH OPTIONS |
|
75 |
.TP |
|
76 |
-o \fIoutputfile\fR |
|
77 |
.br |
|
78 |
Concatenates the resulting header or source files for all the classes listed on the command line into an output file\&. Only one of \f3-o\fR or \f3-d\fR can be used\&. |
|
79 |
.TP |
|
80 |
-d \fIdirectory\fR |
|
81 |
.br |
|
82 |
Sets the directory where the \f3javah\fR command saves the header files or the stub files\&. Only one of \f3-d\fR or \f3-o\fR can be used\&. |
|
83 |
.TP |
|
84 |
-stubs |
|
85 |
.br |
|
86 |
Causes the \f3javah\fR command to generate C declarations from the Java object file\&. |
|
87 |
.TP |
|
88 |
-verbose |
|
89 |
.br |
|
90 |
Indicates verbose output and causes the \f3javah\fR command to print a message to \f3stdout\fR about the status of the generated files\&. |
|
91 |
.TP |
|
92 |
-help |
|
93 |
.br |
|
94 |
Prints a help message for \f3javah\fR usage\&. |
|
95 |
.TP |
|
96 |
-version |
|
97 |
.br |
|
98 |
Prints \f3javah\fR command release information\&. |
|
99 |
.TP |
|
100 |
-jni |
|
101 |
.br |
|
102 |
Causes the \f3javah\fR command to create an output file containing JNI-style native method function prototypes\&. This is the default output; use of \f3-jni\fR is optional\&. |
|
103 |
.TP |
|
104 |
-classpath \fIpath\fR |
|
2 | 105 |
.br |
21743 | 106 |
Specifies the path the \f3javah\fR command uses to look up classes\&. Overrides the default or the \f3CLASSPATH\fR environment variable when it is set\&. Directories are separated by colons on Oracle Solaris and semicolons on Windows\&. The general format for path is: |
107 |
||
108 |
\fIOracle Solaris\fR: |
|
109 |
||
110 |
\&.:\fIyour-path\fR |
|
111 |
||
112 |
Example: \f3\&.:/home/avh/classes:/usr/local/java/classes\fR |
|
113 |
||
114 |
\fIWindows\fR: |
|
115 |
||
116 |
\&.;\fIyour-path\fR |
|
117 |
||
118 |
Example: \f3\&.;C:\eusers\edac\eclasses;C:\etools\ejava\eclasses\fR |
|
119 |
||
120 |
As a special convenience, a class path element that contains a base name of * is considered equivalent to specifying a list of all the files in the directory with the extension \f3\&.jar\fR or \f3\&.JAR\fR\&. |
|
2692 | 121 |
|
21743 | 122 |
For example, if directory \f3mydir\fR contains \f3a\&.jar\fR and \f3b\&.JAR\fR, then the class path element \f3mydir/*\fR is expanded to a \f3A\fR\f3\&.jar:b\&.JAR\fR, except that the order of jar files is unspecified\&. All JAR files in the specified directory, including hidden ones, are included in the list\&. A class path entry that consists of * expands to a list of all the JAR files in the current directory\&. The \f3CLASSPATH\fR environment variable, where defined, is similarly expanded\&. Any class path wild card expansion occurs before the Java Virtual Machine (JVM) is started\&. A Java program will never see unexpanded wild cards except by querying the environment\&. For example, by calling \f3System\&.getenv("CLASSPATH")\fR\&. |
123 |
.TP |
|
124 |
-bootclasspath \fIpath\fR |
|
125 |
.br |
|
126 |
Specifies the path from which to load bootstrap classes\&. By default, the bootstrap classes are the classes that implement the core Java platform located in \f3jre\elib\ert\&.jar\fR and several other JAR files\&. |
|
127 |
.TP |
|
128 |
-old |
|
129 |
.br |
|
130 |
Specifies that old JDK 1\&.0-style header files should be generated\&. |
|
131 |
.TP |
|
132 |
-force |
|
133 |
.br |
|
134 |
Specifies that output files should always be written\&. |
|
135 |
.TP |
|
136 |
-J\fIoption\fR |
|
137 |
.br |
|
138 |
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&. |
|
139 |
.SH SEE\ ALSO |
|
140 |
.TP 0.2i |
|
141 |
\(bu |
|
142 |
javah(1) |
|
143 |
.TP 0.2i |
|
144 |
\(bu |
|
145 |
java(1) |
|
146 |
.TP 0.2i |
|
147 |
\(bu |
|
148 |
jdb(1) |
|
149 |
.TP 0.2i |
|
150 |
\(bu |
|
151 |
javap(1) |
|
152 |
.TP 0.2i |
|
153 |
\(bu |
|
154 |
javadoc(1) |
|
31876
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
155 |
.RE |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
156 |
.br |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
157 |
'pl 8.5i |
91b22707521a
8131105: Header Template for nroff man pages *.1 files contains errors
mfang
parents:
21743
diff
changeset
|
158 |
'bp |