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