1 '\" t 2 .\" Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved. 3 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 .\" 5 .\" This code is free software; you can redistribute it and/or modify it 6 .\" under the terms of the GNU General Public License version 2 only, as 7 .\" published by the Free Software Foundation. 8 .\" 9 .\" This code is distributed in the hope that it will be useful, but WITHOUT 10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 .\" version 2 for more details (a copy is included in the LICENSE file that 13 .\" accompanied this code). 14 .\" 15 .\" You should have received a copy of the GNU General Public License version 16 .\" 2 along with this work; if not, write to the Free Software Foundation, 17 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 .\" 19 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 .\" or visit www.oracle.com if you need additional information or have any 21 .\" questions. 22 .\" 23 .\" Title: javap 24 .\" Language: Japanese 25 .\" Date: 2014年8月8日 26 .\" SectDesc: 基本ツール 27 .\" Software: JDK 8 28 .\" Arch: 汎用 29 .\" Part Number: E58103-01 30 .\" Doc ID: JSSON 31 .\" 32 .if n .pl 99999 33 .TH "javap" "1" "2014年8月8日" "JDK 8" "基本ツール" 34 .\" ----------------------------------------------------------------- 35 .\" * Define some portability stuff 36 .\" ----------------------------------------------------------------- 37 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 .\" http://bugs.debian.org/507673 39 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html 40 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 41 .ie \n(.g .ds Aq \(aq 42 .el .ds Aq ' 43 .\" ----------------------------------------------------------------- 44 .\" * set default formatting 45 .\" ----------------------------------------------------------------- 46 .\" disable hyphenation 47 .nh 48 .\" disable justification (adjust text to left margin only) 49 .ad l 50 .\" ----------------------------------------------------------------- 51 .\" * MAIN CONTENT STARTS HERE * 52 .\" ----------------------------------------------------------------- 53 .SH "名前" 54 javap \- 1つ以上のクラス・ファイルを逆アセンブルします。 55 .SH "概要" 56 .sp 57 .if n \{\ 58 .RS 4 59 .\} 60 .nf 61 \fBjavap\fR [\fIoptions\fR] \fIclassfile\fR\&.\&.\&. 62 .fi 63 .if n \{\ 64 .RE 65 .\} 66 .PP 67 \fIoptions\fR 68 .RS 4 69 コマンド行オプション。オプションを参照してください。 70 .RE 71 .PP 72 \fIclassfile\fR 73 .RS 4 74 注釈の処理対象となる、空白で区切った1つ以上のクラス(DocFooter\&.classなど)。クラス・パスで検出できるクラスを、ファイル名またはURL(\fBfile:///home/user/myproject/src/DocFooter\&.class\fRなど)で指定できます。 75 .RE 76 .SH "説明" 77 .PP 78 \fBjavap\fRコマンドは、1つまたは複数のクラス・ファイルを逆アセンブルします。その出力は指定するオプションにより異なります。オプションを指定しない場合、\fBjavap\fRコマンドは、そのパッケージ、渡されたクラスのprotectedおよびpublicのフィールドとメソッドを出力します。\fBjavap\fRコマンドはその出力を\fB標準出力\fRに表示します。 79 .SH "オプション" 80 .PP 81 \-help 82 .br 83 \-\-help 84 .br 85 \-? 86 .RS 4 87 \fBjavap\fRコマンドについてのヘルプ・メッセージを出力します。 88 .RE 89 .PP 90 \-version 91 .RS 4 92 リリース情報を出力します。 93 .RE 94 .PP 95 \-l 96 .RS 4 97 行番号とローカル変数表を出力します。 98 .RE 99 .PP 100 \-public 101 .RS 4 102 publicクラスおよびメンバーのみ表示します。 103 .RE 104 .PP 105 \-protected 106 .RS 4 107 protectedおよびpublicのクラスとメンバーのみを表示します。 108 .RE 109 .PP 110 \-private 111 .br 112 \-p 113 .RS 4 114 すべてのクラスとメンバーを表示します。 115 .RE 116 .PP 117 \-J\fIoption\fR 118 .RS 4 119 指定されたオプションをJVMに渡します。次に例を示します。 120 .sp 121 .if n \{\ 122 .RS 4 123 .\} 124 .nf 125 \fBjavap \-J\-version\fR 126 \fBjavap \-J\-Djava\&.security\&.manager \-J\-Djava\&.security\&.policy=MyPolicy MyClassName\fR 127 128 .fi 129 .if n \{\ 130 .RE 131 .\} 132 JVMオプションの詳細は、コマンドのマニュアルを参照してください。 133 .RE 134 .PP 135 \-s 136 .RS 4 137 内部の型シグニチャを出力します。 138 .RE 139 .PP 140 \-sysinfo 141 .RS 4 142 処理中のクラスのシステム情報(パス、サイズ、日付、MD5ハッシュ)を表示します。 143 .RE 144 .PP 145 \-constants 146 .RS 4 147 \fBstatic final\fR定数を表示します。 148 .RE 149 .PP 150 \-c 151 .RS 4 152 クラスの各メソッドのために逆アセンブルされるコード、すなわちJavaバイトコードからなる命令を表示します。 153 .RE 154 .PP 155 \-verbose 156 .RS 4 157 メソッドのスタック・サイズ、localsとargumentsの数を出力します。 158 .RE 159 .PP 160 \-classpath \fIpath\fR 161 .RS 4 162 クラスを探すために\fBjavap\fRコマンドが使用するパスを指定します。デフォルトまたは\fBCLASSPATH\fR環境変数の設定をオーバーライドします。 163 .RE 164 .PP 165 \-bootclasspath \fIpath\fR 166 .RS 4 167 ブートストラップ・クラスをロードするパスを指定します。ブートストラップ・クラスは、デフォルトでは\fBjre/lib/rt\&.jar\fRおよび他のいくつかのJARファイルにある、コアJavaプラットフォームを実装するクラスです。 168 .RE 169 .PP 170 \-extdir \fIdirs\fR 171 .RS 4 172 インストールされた拡張機能を検索する場所をオーバーライドします。拡張機能のデフォルト位置は\fBjava\&.ext\&.dirs\fRです。 173 .RE 174 .SH "例" 175 .PP 176 次の\fBDocFooter\fRクラスをコンパイルします。 177 .sp 178 .if n \{\ 179 .RS 4 180 .\} 181 .nf 182 \fBimport java\&.awt\&.*;\fR 183 \fBimport java\&.applet\&.*;\fR 184 \fB \fR 185 \fBpublic class DocFooter extends Applet {\fR 186 \fB String date;\fR 187 \fB String email;\fR 188 \fB \fR 189 \fB public void init() {\fR 190 \fB resize(500,100);\fR 191 \fB date = getParameter("LAST_UPDATED");\fR 192 \fB email = getParameter("EMAIL");\fR 193 \fB }\fR 194 \fB \fR 195 \fB public void paint(Graphics g) {\fR 196 \fB g\&.drawString(date + " by ",100, 15);\fR 197 \fB g\&.drawString(email,290,15);\fR 198 \fB }\fR 199 \fB}\fR 200 201 .fi 202 .if n \{\ 203 .RE 204 .\} 205 .PP 206 \fBjavap DocFooter\&.class\fRコマンドからの出力は次を生成します。 207 .sp 208 .if n \{\ 209 .RS 4 210 .\} 211 .nf 212 \fBCompiled from "DocFooter\&.java"\fR 213 \fBpublic class DocFooter extends java\&.applet\&.Applet {\fR 214 \fB java\&.lang\&.String date;\fR 215 \fB java\&.lang\&.String email;\fR 216 \fB public DocFooter();\fR 217 \fB public void init();\fR 218 \fB public void paint(java\&.awt\&.Graphics);\fR 219 \fB}\fR 220 221 .fi 222 .if n \{\ 223 .RE 224 .\} 225 .PP 226 \fBjavap \-c DocFooter\&.class\fRコマンドからの出力は次を生成します。 227 .sp 228 .if n \{\ 229 .RS 4 230 .\} 231 .nf 232 \fBCompiled from "DocFooter\&.java"\fR 233 \fBpublic class DocFooter extends java\&.applet\&.Applet {\fR 234 \fB java\&.lang\&.String date;\fR 235 \fB java\&.lang\&.String email;\fR 236 237 \fB public DocFooter();\fR 238 \fB Code:\fR 239 \fB 0: aload_0 \fR 240 \fB 1: invokespecial #1 // Method\fR 241 \fBjava/applet/Applet\&."<init>":()V\fR 242 \fB 4: return \fR 243 244 \fB public void init();\fR 245 \fB Code:\fR 246 \fB 0: aload_0 \fR 247 \fB 1: sipush 500\fR 248 \fB 4: bipush 100\fR 249 \fB 6: invokevirtual #2 // Method resize:(II)V\fR 250 \fB 9: aload_0 \fR 251 \fB 10: aload_0 \fR 252 \fB 11: ldc #3 // String LAST_UPDATED\fR 253 \fB 13: invokevirtual #4 // Method\fR 254 \fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR 255 \fB 16: putfield #5 // Field date:Ljava/lang/String;\fR 256 \fB 19: aload_0 \fR 257 \fB 20: aload_0 \fR 258 \fB 21: ldc #6 // String EMAIL\fR 259 \fB 23: invokevirtual #4 // Method\fR 260 \fB getParameter:(Ljava/lang/String;)Ljava/lang/String;\fR 261 \fB 26: putfield #7 // Field email:Ljava/lang/String;\fR 262 \fB 29: return \fR 263 264 \fB public void paint(java\&.awt\&.Graphics);\fR 265 \fB Code:\fR 266 \fB 0: aload_1 \fR 267 \fB 1: new #8 // class java/lang/StringBuilder\fR 268 \fB 4: dup \fR 269 \fB 5: invokespecial #9 // Method\fR 270 \fB java/lang/StringBuilder\&."<init>":()V\fR 271 \fB 8: aload_0 \fR 272 \fB 9: getfield #5 // Field date:Ljava/lang/String;\fR 273 \fB 12: invokevirtual #10 // Method\fR 274 \fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR 275 \fB 15: ldc #11 // String by \fR 276 \fB 17: invokevirtual #10 // Method\fR 277 \fB java/lang/StringBuilder\&.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\fR 278 \fB 20: invokevirtual #12 // Method\fR 279 \fB java/lang/StringBuilder\&.toString:()Ljava/lang/String;\fR 280 \fB 23: bipush 100\fR 281 \fB 25: bipush 15\fR 282 \fB 27: invokevirtual #13 // Method\fR 283 \fB java/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR 284 \fB 30: aload_1 \fR 285 \fB 31: aload_0 \fR 286 \fB 32: getfield #7 // Field email:Ljava/lang/String;\fR 287 \fB 35: sipush 290\fR 288 \fB 38: bipush 15\fR 289 \fB 40: invokevirtual #13 // Method\fR 290 \fBjava/awt/Graphics\&.drawString:(Ljava/lang/String;II)V\fR 291 \fB 43: return \fR 292 \fB}\fR 293 294 .fi 295 .if n \{\ 296 .RE 297 .\} 298 .SH "関連項目" 299 .sp 300 .RS 4 301 .ie n \{\ 302 \h'-04'\(bu\h'+03'\c 303 .\} 304 .el \{\ 305 .sp -1 306 .IP \(bu 2.3 307 .\} 308 java(1) 309 .RE 310 .sp 311 .RS 4 312 .ie n \{\ 313 \h'-04'\(bu\h'+03'\c 314 .\} 315 .el \{\ 316 .sp -1 317 .IP \(bu 2.3 318 .\} 319 javac(1) 320 .RE 321 .sp 322 .RS 4 323 .ie n \{\ 324 \h'-04'\(bu\h'+03'\c 325 .\} 326 .el \{\ 327 .sp -1 328 .IP \(bu 2.3 329 .\} 330 javadoc(1) 331 .RE 332 .sp 333 .RS 4 334 .ie n \{\ 335 \h'-04'\(bu\h'+03'\c 336 .\} 337 .el \{\ 338 .sp -1 339 .IP \(bu 2.3 340 .\} 341 jdb(1) 342 .RE 343 .sp 344 .RS 4 345 .ie n \{\ 346 \h'-04'\(bu\h'+03'\c 347 .\} 348 .el \{\ 349 .sp -1 350 .IP \(bu 2.3 351 .\} 352 jdeps(1) 353 .RE 354 .br 355 'pl 8.5i 356 'bp