author | fparain |
Wed, 28 Mar 2012 02:20:09 -0700 | |
changeset 12299 | ea3d337ed663 |
parent 9566 | d7241af95355 |
child 23600 | d21826f6c789 |
permissions | -rw-r--r-- |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
1 |
." Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. |
2692 | 2 |
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 |
." |
|
4 |
." This code is free software; you can redistribute it and/or modify it |
|
5 |
." under the terms of the GNU General Public License version 2 only, as |
|
6 |
." published by the Free Software Foundation. |
|
7 |
." |
|
8 |
." This code is distributed in the hope that it will be useful, but WITHOUT |
|
9 |
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
10 |
." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
11 |
." version 2 for more details (a copy is included in the LICENSE file that |
|
12 |
." accompanied this code). |
|
13 |
." |
|
14 |
." You should have received a copy of the GNU General Public License version |
|
15 |
." 2 along with this work; if not, write to the Free Software Foundation, |
|
16 |
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
17 |
." |
|
5506 | 18 |
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
19 |
." or visit www.oracle.com if you need additional information or have any |
|
20 |
." questions. |
|
2692 | 21 |
." |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
22 |
.TH javap 1 "07 May 2011" |
2692 | 23 |
|
24 |
.LP |
|
9352 | 25 |
.SH "名前" |
26 |
javap \- Java クラスファイル逆アセンブラ |
|
2692 | 27 |
.LP |
28 |
.LP |
|
9352 | 29 |
クラスファイルを逆アセンブルします。 |
2692 | 30 |
.LP |
9352 | 31 |
.SH "形式" |
2692 | 32 |
.LP |
33 |
.nf |
|
34 |
\f3 |
|
35 |
.fl |
|
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
36 |
javap [ \fP\f3options\fP\f3 ] classes |
2692 | 37 |
.fl |
38 |
\fP |
|
39 |
.fi |
|
40 |
||
41 |
.LP |
|
9352 | 42 |
.SH "説明" |
2 | 43 |
.LP |
44 |
.LP |
|
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
45 |
\f3javap\fP コマンドは、1 つまたは複数のクラスファイルを逆アセンブルします。その出力は指定するオプションにより異なります。オプションを指定しない場合、\f3javap\fP は、そのパッケージ、渡されたクラスの protected および public のフィールドとメソッドを出力します。\f3javap\fP はその出力を標準出力に表示します。 |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
46 |
.LP |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
47 |
.RS 3 |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
48 |
.TP 3 |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
49 |
options |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
50 |
コマンド行オプション。 |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
51 |
.TP 3 |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
52 |
classes |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
53 |
注釈の処理対象となる 1 つ以上のクラス \f2DocFooter.class\fP など) のリスト (空白区切り)。クラスパスで見つかるクラスは、ファイル名 ( \f2/home/user/myproject/src/DocFooter.class\fP など) または URL ( \f2file:///home/user/myproject/src/DocFooter.class\fP など) で指定できます。 |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
54 |
.RE |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
55 |
|
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
56 |
.LP |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
57 |
.LP |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
58 |
たとえば、次のクラス宣言をコンパイルするとします。 |
2692 | 59 |
.LP |
2 | 60 |
.nf |
61 |
\f3 |
|
2692 | 62 |
.fl |
2 | 63 |
import java.awt.*; |
2692 | 64 |
.fl |
2 | 65 |
import java.applet.*; |
2692 | 66 |
.fl |
2 | 67 |
|
2692 | 68 |
.fl |
2 | 69 |
public class DocFooter extends Applet { |
2692 | 70 |
.fl |
71 |
String date; |
|
72 |
.fl |
|
73 |
String email; |
|
74 |
.fl |
|
2 | 75 |
|
2692 | 76 |
.fl |
77 |
public void init() { |
|
78 |
.fl |
|
79 |
resize(500,100); |
|
80 |
.fl |
|
81 |
date = getParameter("LAST_UPDATED"); |
|
82 |
.fl |
|
83 |
email = getParameter("EMAIL"); |
|
84 |
.fl |
|
85 |
} |
|
86 |
.fl |
|
2 | 87 |
|
2692 | 88 |
.fl |
89 |
public void paint(Graphics g) { |
|
90 |
.fl |
|
91 |
g.drawString(date + " by ",100, 15); |
|
92 |
.fl |
|
93 |
g.drawString(email,290,15); |
|
94 |
.fl |
|
95 |
} |
|
96 |
.fl |
|
2 | 97 |
} |
2692 | 98 |
.fl |
99 |
\fP |
|
2 | 100 |
.fi |
2692 | 101 |
|
2 | 102 |
.LP |
2692 | 103 |
.LP |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
104 |
\f3javap DocFooter.class\fP がもたらす出力は次のようになります。 |
2692 | 105 |
.LP |
106 |
.nf |
|
2 | 107 |
\f3 |
2692 | 108 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
109 |
Compiled from "DocFooter.java" |
2692 | 110 |
.fl |
2 | 111 |
public class DocFooter extends java.applet.Applet { |
2692 | 112 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
113 |
java.lang.String date; |
2692 | 114 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
115 |
java.lang.String email; |
2692 | 116 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
117 |
public DocFooter(); |
2692 | 118 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
119 |
public void init(); |
2692 | 120 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
121 |
public void paint(java.awt.Graphics); |
2692 | 122 |
.fl |
2 | 123 |
} |
2692 | 124 |
.fl |
125 |
\fP |
|
2 | 126 |
.fi |
2692 | 127 |
|
2 | 128 |
.LP |
2692 | 129 |
.LP |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
130 |
\f3javap \-c DocFooter.class\fP がもたらす出力は次のようになります。 |
2 | 131 |
.LP |
132 |
.nf |
|
133 |
\f3 |
|
134 |
.fl |
|
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
135 |
Compiled from "DocFooter.java" |
2 | 136 |
.fl |
137 |
public class DocFooter extends java.applet.Applet { |
|
138 |
.fl |
|
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
139 |
java.lang.String date; |
2 | 140 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
141 |
|
2 | 142 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
143 |
java.lang.String email; |
2 | 144 |
.fl |
145 |
||
146 |
.fl |
|
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
147 |
public DocFooter(); |
2 | 148 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
149 |
Code: |
2 | 150 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
151 |
0: aload_0 |
2 | 152 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
153 |
1: invokespecial #1 // Method java/applet/Applet."<init>":()V |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
154 |
.fl |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
155 |
4: return |
2 | 156 |
.fl |
157 |
||
158 |
.fl |
|
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
159 |
public void init(); |
2 | 160 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
161 |
Code: |
2 | 162 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
163 |
0: aload_0 |
2 | 164 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
165 |
1: sipush 500 |
2 | 166 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
167 |
4: bipush 100 |
2 | 168 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
169 |
6: invokevirtual #2 // Method resize:(II)V |
2 | 170 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
171 |
9: aload_0 |
2 | 172 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
173 |
10: aload_0 |
2 | 174 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
175 |
11: ldc #3 // String LAST_UPDATED |
2 | 176 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
177 |
13: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String; |
2 | 178 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
179 |
16: putfield #5 // Field date:Ljava/lang/String; |
2 | 180 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
181 |
19: aload_0 |
2 | 182 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
183 |
20: aload_0 |
2 | 184 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
185 |
21: ldc #6 // String EMAIL |
2 | 186 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
187 |
23: invokevirtual #4 // Method getParameter:(Ljava/lang/String;)Ljava/lang/String; |
2 | 188 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
189 |
26: putfield #7 // Field email:Ljava/lang/String; |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
190 |
.fl |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
191 |
29: return |
2 | 192 |
.fl |
193 |
||
194 |
.fl |
|
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
195 |
public void paint(java.awt.Graphics); |
2 | 196 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
197 |
Code: |
2 | 198 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
199 |
0: aload_1 |
2 | 200 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
201 |
1: new #8 // class java/lang/StringBuilder |
2 | 202 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
203 |
4: dup |
2 | 204 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
205 |
5: invokespecial #9 // Method java/lang/StringBuilder."<init>":()V |
2 | 206 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
207 |
8: aload_0 |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
208 |
.fl |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
209 |
9: getfield #5 // Field date:Ljava/lang/String; |
2 | 210 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
211 |
12: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; |
2 | 212 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
213 |
15: ldc #11 // String by |
2 | 214 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
215 |
17: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; |
2 | 216 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
217 |
20: invokevirtual #12 // Method java/lang/StringBuilder.toString:()Ljava/lang/String; |
2 | 218 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
219 |
23: bipush 100 |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
220 |
.fl |
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
221 |
25: bipush 15 |
2 | 222 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
223 |
27: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V |
2 | 224 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
225 |
30: aload_1 |
2 | 226 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
227 |
31: aload_0 |
2 | 228 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
229 |
32: getfield #7 // Field email:Ljava/lang/String; |
2 | 230 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
231 |
35: sipush 290 |
2 | 232 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
233 |
38: bipush 15 |
2 | 234 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
235 |
40: invokevirtual #13 // Method java/awt/Graphics.drawString:(Ljava/lang/String;II)V |
2 | 236 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
237 |
43: return |
2 | 238 |
.fl |
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
239 |
} |
2 | 240 |
.fl |
241 |
\fP |
|
242 |
.fi |
|
243 |
||
244 |
.LP |
|
9352 | 245 |
.SH "オプション" |
2 | 246 |
.LP |
2692 | 247 |
.RS 3 |
2 | 248 |
.TP 3 |
9352 | 249 |
\-help \-\-help \-? |
250 |
\f3javap\fP のヘルプメッセージを出力します。 |
|
251 |
.TP 3 |
|
252 |
\-version |
|
253 |
バージョン情報を表示します。 |
|
2 | 254 |
.TP 3 |
255 |
\-l |
|
9352 | 256 |
行番号と局所変数テーブルを表示します。 |
2 | 257 |
.TP 3 |
258 |
\-public |
|
9352 | 259 |
public クラスおよびメンバーだけを表示します。 |
2 | 260 |
.TP 3 |
261 |
\-protected |
|
9352 | 262 |
protected および public のクラスとメンバーだけを表示します。 |
2 | 263 |
.TP 3 |
264 |
\-package |
|
9352 | 265 |
package、protected、および public のクラスとメンバーだけを表示します。これはデフォルトの設定です。 |
2 | 266 |
.TP 3 |
9352 | 267 |
\-private \-p |
268 |
すべてのクラスとメンバーを表示します。 |
|
2 | 269 |
.TP 3 |
270 |
\-Jflag |
|
9352 | 271 |
ランタイムシステムに直接 \f2flag\fP を渡します。使用例を次に示します。 |
2 | 272 |
.nf |
273 |
\f3 |
|
274 |
.fl |
|
275 |
javap \-J\-version |
|
276 |
.fl |
|
277 |
javap \-J\-Djava.security.manager \-J\-Djava.security.policy=MyPolicy MyClassName |
|
278 |
.fl |
|
279 |
\fP |
|
280 |
.fi |
|
281 |
.TP 3 |
|
282 |
\-s |
|
9352 | 283 |
内部の型シグニチャーを出力します。 |
284 |
.TP 3 |
|
285 |
\-sysinfo |
|
286 |
処理中のクラスのシステム情報 (パス、サイズ、日付、MD5 ハッシュ) を表示します。 |
|
287 |
.TP 3 |
|
288 |
\-constants |
|
289 |
static final 定数を表示します。 |
|
2 | 290 |
.TP 3 |
291 |
\-c |
|
9352 | 292 |
クラスの各メソッドのために逆アセンブルされるコード、すなわち Java バイトコードから成る命令を表示します。これらは |
2692 | 293 |
.na |
9352 | 294 |
\f2「Java Virtual Machine Specification」\fP @ |
2 | 295 |
.fi |
9352 | 296 |
http://java.sun.com/docs/books/vmspec/にドキュメント化されています。 |
2 | 297 |
.TP 3 |
298 |
\-verbose |
|
9352 | 299 |
メソッドのスタックサイズ、および \f2locals\fP と \f2args\fP の数を出力します。 |
2 | 300 |
.TP 3 |
301 |
\-classpath path |
|
9566
d7241af95355
7043580: integrate man page translation drop 2 into jdk7
mfang
parents:
9352
diff
changeset
|
302 |
\f3javap\fP がクラスを探すために使用するパスを指定します。デフォルトまたは CLASSPATH 環境変数設定を上書きします。 |
2 | 303 |
.TP 3 |
304 |
\-bootclasspath path |
|
9352 | 305 |
ブートストラップクラスをロードするパスを指定します。ブートストラップクラスは、デフォルトでは \f2jre/lib/rt.jar\fP および他のいくつかの JAR ファイル にある、コア Java 2 プラットフォームを実装するクラスです。 |
2 | 306 |
.TP 3 |
307 |
\-extdirs dirs |
|
9352 | 308 |
インストールされた拡張機能を検索する場所をオーバーライドします。拡張機能は、デフォルトでは \f2java.ext.dirs\fP にあります。 |
2692 | 309 |
.RE |
310 |
||
311 |
.LP |
|
9352 | 312 |
.SH "関連項目" |
2 | 313 |
.LP |
314 |
.LP |
|
9352 | 315 |
javac(1)、java(1)、jdb(1)、javah(1)、javadoc(1) |
2 | 316 |
.LP |
317 |