jdk/src/linux/doc/man/ja/jar.1
author katleman
Thu, 05 Jan 2012 08:42:37 -0800
changeset 11376 075fe3928b7f
parent 9566 d7241af95355
child 23600 d21826f6c789
permissions -rw-r--r--
Added tag jdk8-b20 for changeset 90e14ec89395
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9566
d7241af95355 7043580: integrate man page translation drop 2 into jdk7
mfang
parents: 9352
diff changeset
     1
." Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     2
." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     3
."
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     4
." This code is free software; you can redistribute it and/or modify it
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     5
." under the terms of the GNU General Public License version 2 only, as
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     6
." published by the Free Software Foundation.
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     7
."
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     8
." This code is distributed in the hope that it will be useful, but WITHOUT
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
     9
." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    10
." FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    11
." version 2 for more details (a copy is included in the LICENSE file that
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    12
." accompanied this code).
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    13
."
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    14
." You should have received a copy of the GNU General Public License version
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    15
." 2 along with this work; if not, write to the Free Software Foundation,
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    16
." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    17
."
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2692
diff changeset
    18
." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2692
diff changeset
    19
." or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2692
diff changeset
    20
." questions.
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    21
."
9566
d7241af95355 7043580: integrate man page translation drop 2 into jdk7
mfang
parents: 9352
diff changeset
    22
.TH jar 1 "07 May 2011"
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    23
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    25
.SH "名前"
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    26
jar \- Java ARchive ツール
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    27
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    28
\f3jar\fP は複数のファイルを 1 つの JAR アーカイブファイルに結合します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    29
.RS 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    30
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    31
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    32
形式 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    33
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    34
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    35
説明 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    36
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    37
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    38
オプション 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    39
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    40
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    41
コマンド行引数ファイル 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    42
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    43
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    44
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    45
.TP 2
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    46
o
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    47
関連項目 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    48
.RE
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    49
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    50
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    51
.SH "形式"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    53
.RS 3
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
.TP 3
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    55
JAR ファイルの作成 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
\f4jar c\fP\f2[v0Mmfe] [\fP\f2manifest\fP\f2] [\fP\f2jarfile\fP\f2] [\fP\f2entrypoint\fP\f2] [\-C\fP \f2dir\fP\f2]\fP \f2inputfiles\fP \f2[\-J\fP\f2option\fP\f2]\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
.TP 3
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    58
JAR ファイルの更新 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
\f4jar u\fP\f2[v0Mmfe] [\fP\f2manifest\fP\f2] [\fP\f2jarfile\fP\f2] [\fP\f2entrypoint\fP\f2] [\-C\fP \f2dir\fP\f2]\fP \f2inputfiles\fP \f2[\-J\fP\f2option\fP\f2]\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
.TP 3
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    61
JAR ファイルの抽出 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
\f4jar x\fP\f2[vf] [\fP\f2jarfile\fP\f2] [\fP\f2inputfiles\fP\f2] [\-J\fP\f2option\fP\f2]\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
.TP 3
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    64
JAR ファイルの内容の表形式による一覧表示 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
\f4jar t\fP\f2[vf] [\fP\f2jarfile\fP\f2] [\fP\f2inputfiles\fP\f2] [\-J\fP\f2option\fP\f2]\fP 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
.TP 3
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    67
JAR ファイルへのインデックスの追加 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
\f4jar i\fP \f2jarfile\fP \f2[\-J\fP\f2option\fP\f2]\fP 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    69
.RE
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    70
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    73
説明
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    75
.RS 3
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
cuxtiv0Mmfe 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    78
\f2jar\fP コマンドを制御するオプション 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
.TP 3
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    80
jarfile 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    81
作成 (\f2c\fP)、更新 (\f2u\fP)、抽出 (\f2x\fP)、または目次表示 (\f2t\fP) の対象となる JAR ファイル。\f2f\fP オプションとファイル名 \f2jarfile\fP とがペアになります。 つまり、片方を記述すれば、もう一方も記述する必要があります。 \f2f\fP と \f2jarfile\fP を省略すると、標準入力から「JAR ファイル」が取得されるか (x および t の場合)、標準出力へ「JAR ファイル」が送信されます(c および u の場合)。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
.TP 3
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    83
inputfiles 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    84
\f2jarfile\fP に結合されるか (c および u の場合)、\f2jarfile\fP から抽出 (x の場合) または一覧表示 (t の場合) される、空白で区切られたファイルまたはディレクトリ。すべてのディレクトリは再帰的に処理されます。このファイルは、オプション \f20\fP (ゼロ) を使用しないかぎり圧縮されます。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
.TP 3
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    86
manifest 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    87
JAR ファイルの MANIFEST.MF 内に含めるべき \f2name\fP\f2:\fP \f2value\fP ペアが含まれている既存のマニフェストファイル。\f2m\fP オプションとファイル名 \f2manifest\fP とがペアになります。つまり、片方を記述すれば、もう一方も記述する必要があります。\f3m\fP、\f3f\fP、および \f3e\fP の出現順序は、\f2manifest\fP、\f2jarfile\fP、\f2entrypoint\fP の出現順序と一致する必要があります。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    88
.TP 3
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
entrypoint 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    90
実行可能 JAR ファイル内にバンドルされたスタンドアロンアプリケーションのアプリケーションエントリポイントとして設定するクラスの名前。\f2\-e\fP オプションと entrypoint は対になっています。どちらかを指定する場合は両方とも指定する必要があります。\f3m\fP、\f3f\fP、および \f3e\fP の出現順序は、\f2manifest\fP、\f2jarfile\fP、\f2entrypoint\fP の出現順序と一致する必要があります。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
\-C\ dir 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    93
これに続く \f2inputfiles\fP 引数を処理する間、ディレクトリを \f2dir\fP へ一時的に変更します。 \f2\-C\ \fP\f2\-\ dir\fP \f2inputfiles\fP のセットは複数使用できます。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
\-Joption 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
    96
Java 実行環境へ渡されるオプション。\f2\-J\fP と \f2option\fP の間には空白を入れないでください。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    97
.RE
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    98
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
    99
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   100
.SH "説明"
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   101
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   102
\f3jar\fP ツールは複数のファイルを 1 つの JAR アーカイブファイルに結合します。\f3jar\fP は、ZIP および 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   103
.na
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   104
\f2ZLIB\fP @
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   106
http://www.gzip.org/zlib/ 圧縮形式に基づく汎用のアーカイブおよび圧縮ツールです。ただし \f3jar\fP ツールの主な目的は、いくつかの Java アプレットやアプリケーションを 1 個のアーカイブに統合することです。アプレットやアプリケーションのコンポーネント (ファイル、イメージ、およびサウンド) が 1 つのアーカイブに結合されていると、Java エージェント (ブラウザなど) は、それらのコンポーネントを 1 回の HTTP トランザクションでダウンロードすることができ、コンポーネントごとに新しい接続を必要とすることがありません。これにより、ダウンロード時間が大幅に短縮されます。また、\f3jar\fP はファイルの圧縮も行うので、ダウンロード時間がさらに短縮されます。また、ファイル内の個々のエントリにアプレット作成者による署名を書き込めるので、配布元の認証が可能になります。jar ツールの構文は、\f2tar\fP コマンドの構文とほぼ同じです。\f3JAR\fP アーカイブは、圧縮されているかどうかにかかわらず、クラスパスのエントリとして使用できます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   107
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   108
複数のファイルを JAR ファイルへ結合する一般的な使用法は次のとおりです。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   109
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   110
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   111
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   112
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   113
% jar cf myFile.jar *.class
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   114
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   115
\fP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
.fi
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   117
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   119
この例では、現在のディレクトリにあるクラス (.class) ファイルがすべて、\f2myFile.jar\fP という名前のファイルに格納されます。jar ツールは自動的に、 \f2META\-INF/MANIFEST.MF\fP という名前のマニフェストファイルエントリを生成します。これは常に、JAR ファイルの最初のエントリになります。マニフェストファイルは、アーカイブに関するメタ情報を宣言し、そのデータを \f2name\ :\ value\fP ペアとして格納します。jar ツールがマニフェストファイル内にメタ情報を格納する方法の詳細については、「
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   120
.na
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   121
\f2JAR file specification\fP @
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   123
http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Manifest」を参照してください。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   125
既存のマニフェストファイル内に格納された \f2name\ :\ value\fP ペアを JAR ファイルに含める必要がある場合には、そのファイルを次のように \f2\-m\fP オプションを使って指定します。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
% jar cmf myManifestFile myFile.jar *.class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   136
既存のマニフェストファイルは改行文字で終わっている必要があります。マニフェストファイルが改行文字で終わっていないと、\f3jar\fP はその最終行を解析しません。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   143
\f3注:\ \fPコマンド行に \f2cmf\fP ではなく \f2cfm\fP が指定された jar コマンド (m と \-f オプションの順番を逆にする) の場合、\f3jar\fP コマンド行にまず JAR アーカイブの名前を指定し、続いてマニフェストファイルの名前を指定する必要があります。 次に例を示します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   144
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   145
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   146
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   147
% jar cfm myFile.jar myManifestFile *.class
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   148
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   149
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   150
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   151
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   153
マニフェストは、RFC822 ASCII 形式で規定されたテキスト形式であるため、マニフェストファイルの内容を簡単に表示および編集できます。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   155
JAR ファイルからファイルを抽出する場合は、 \f2x\fP を使用します。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   157
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   158
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   159
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   160
% jar xf myFile.jar
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   161
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   162
\fP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
.fi
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   164
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   165
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   166
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   167
jar ファイルから個別のファイルを抽出する場合は、そのファイル名を指定します。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   168
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   169
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   170
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   171
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   172
% jar xf myFile.jar foo bar
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   173
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   174
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   175
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   176
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   177
.LP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   179
JDK のバージョン 1.3 以降から、\f2jar\fP ユーティリティーで 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   180
.na
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   181
\f2JarIndex\fP @
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   182
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   183
http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR_Index がサポートされています。 JarIndex を使用すると、アプリケーションのクラスローダーで JAR ファイルからクラスがロードされるときの効率が向上します。アプリケーションまたはアプレットが複数の JAR ファイルにバンドルされている場合は、クラスがロードされるときに、必要な JAR ファイル以外のダウンロードおよびオープンは行われません。このパフォーマンスの最適化は、新しい \f2\-i\fP オプションを指定して \f2jar\fP を実行すると有効になります。このオプションを使うと、指定した JAR メインファイルと、そのメインファイルが依存しているすべての JAR ファイルについて、パッケージ位置情報が生成されます。メインファイルが依存している JAR ファイルは、JAR メインファイルのマニフェストの \f2Class\-Path\fP 属性に指定しておく必要があります。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   185
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   186
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   187
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   188
% jar i main.jar
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   189
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   190
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   191
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   192
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   193
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   194
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   195
この例では、 \f2INDEX.LIST\fP ファイルが \f2main.jar\fP の \f2META\-INF\fP ディレクトリ内に挿入されます。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   196
.br
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   197
.br
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   198
このファイルに格納されている情報を使用して、アプリケーションのクラスローダーは、効率的にクラスをロードします。インデックスファイルに位置情報を格納する方法の詳細は、「JarIndex 仕様」を参照してください。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
.br
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   201
ディレクトリをコピーするには、まず \f2dir1\fP 内のファイルを圧縮して \f2stdout\fP に出力し、続いて \f2stdin\fP から抽出して \f2dir2\fP に出力します (\f2\-f\fP オプションはどちらの \f2jar\fP コマンドでも省略)。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   203
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   204
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   205
.fl
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   206
% (cd dir1; jar c .)| (cd dir2; jar x)
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   207
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   208
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   209
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   210
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   212
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   213
\f2jar\fP を使用して JAR ファイルや JAR マニフェストファイルを操作するサンプルコマンドを確認したい場合は、後述の「例」を参照してください。また、「
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
.na
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   215
\f2Java Tutorial\fP @
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   216
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   217
http://download.oracle.com/javase/tutorial/deployment/jar」の JAR コースも参照してください。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   218
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   219
.SH "オプション"
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   220
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   221
.RS 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   222
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   223
c 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   224
f が指定された場合は \f2jarfile\fP という名前の \f2新しい\fP アーカイブファイルを \f2作成し、\fP f と \f2jarfile\fP が省略された場合は標準出力に情報を出力します。\f2inputfiles\fP で指定されたファイルとディレクトリを、このアーカイブに追加します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   225
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   226
u 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   227
f が指定されている場合に、既存ファイル \f2jarfile\fP を \f2更新する目的で、\fP \f2inputfiles\fP に指定されたファイルやディレクトリを追加します。次に例を示します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   228
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   229
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   230
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   231
jar uf foo.jar foo.class
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   232
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   233
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   234
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   235
上のコマンドは、ファイル \f2foo.class\fP を既存の JAR ファイル \f2foo.jar\fP に追加します。次の例に示すように、\f2\-u\fP オプションは、マニフェストエントリも更新できます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   236
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   237
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   238
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   239
jar umf manifest foo.jar
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   240
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   241
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   242
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   243
\f2foo.jar\fP マニフェストをマニフェスト内の \f2name:value\fP ペアで更新します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   244
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   245
x 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   246
f が指定された場合は \f2jarfile\fP \f2から\fP 、 \f2f\fP と \f2jarfile\fP が省略された場合は標準入力から、ファイルやディレクトリを抽出します。\f2inputfiles\fP が指定されている場合は、その指定したファイルとディレクトリだけが抽出されます。指定されていなければ、すべてのファイルとディレクトリが抽出されます。抽出されたファイルの日時は、アーカイブ内で設定されたものです。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   247
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   248
t 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   249
f が指定された場合は \f2jarfile\fP \f2から\fP 、 \f2f\fP と \f2jarfile\fP が省略された場合は標準入力から、目次を表示します。\f2inputfiles\fP が指定されている場合は、その指定したファイルとディレクトリだけが一覧表示されます。指定されていなければ、すべてのファイルとディレクトリが一覧表示されます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   250
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   251
i 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   252
指定された \f2jarfile\fP と、それに依存する JAR ファイルについて、インデックス情報を生成します。たとえば、 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   253
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   254
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   255
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   256
jar i foo.jar
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   257
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   258
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   259
.fi
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   261
上のコマンドは、\f2foo.jar\fP 内に \f2INDEX.LIST\fP ファイルを生成します。 このファイルには、\f2foo.jar\fP と、\f2foo.jar\fP の \f2Class\-Path\fP 属性に指定されたすべての JAR ファイルに入っている各パッケージの位置情報が書き込まれています。インデックスの例を参照してください。  
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   262
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   263
f 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   264
次の各処理の対象となるファイル \f2jarfile\fP を指定します。作成 (\f2c\fP)、更新 (\f2u\fP)、抽出 (\f2x\fP)、インデックス追加 (\f2i\fP)、または表示 (\f2t\fP)。\f2f\fP オプションとファイル名 \f2jarfile\fP とがペアになります。 つまり、片方を記述すれば、もう一方も記述する必要があります。Omitting \f2f\fP と \f2jarfile\fP を省略すると、x や t の場合は \f2標準入力\fPから JAR ファイル名が取得され、c や u の場合は \f2標準出力\fP に JAR ファイルが送信されます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   265
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   266
v 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   267
詳細な出力を標準出力に生成します。あとで例を示します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   268
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   269
0 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   270
(ゼロ) ZIP による圧縮を使用せずに、保存します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   271
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   272
M 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   273
マニフェストファイルエントリを作成しません (c および u の場合)。または、マニフェストファイルエントリが存在する場合にそれを削除します (u の場合)。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   274
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   275
m 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   276
\f2META\-INF/MANIFEST.MF\fP のファイルで指定したマニフェストファイル \f2manifest\fP の \f2name : value\fP の属性ペアを組み込みます。 \f2jar\fP は、すでに同じ名前で存在しないかぎり、その \f2name:value\fP ペアを追加します。同じ名前で存在する場合、 \f2jar\fP はその値を更新します。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   278
コマンド行で、\f3m\fP と \f3f\fP の文字は、\f2manifest\fP と \f2jarfile\fP の入力順序と同じ順序で記述する必要があります。たとえば、次のようにして使います。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   279
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   280
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   281
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   282
jar cmf myManifestFile myFile.jar *.class
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   283
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   284
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   285
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   286
デフォルトのマニフェストには含まれないマニフェストに、特別な目的の \f2name\ :\ value\fP の属性ペアを追加できます。たとえば、ベンダー情報、バージョン情報、パッケージシーリング、または JAR にバンドルされたアプリケーションを実行するための属性を追加できます。「Java Tutorial」の「
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   287
.na
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   288
\f2JAR Files\fP @
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   289
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   290
http://download.oracle.com/javase/tutorial/deployment/jar/」コースを参照し、  \f4\-m\fP オプションの使用例を確認してください。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
.TP 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
e 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   293
実行可能 JAR ファイル内にバンドルされたスタンドアロンアプリケーションのアプリケーションエントリポイントとして、\f2entrypoint\fP を設定します。このオプションを使用すると、マニフェストファイル内の \f2Main\-Class\fP 属性値が作成または上書きされます。このオプションは、JAR ファイルの作成中または更新中に使用できます。このオプションを使えば、マニフェストファイルを編集または作成することなしに、アプリケーションのエントリポイントを指定できます。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
.br
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   296
たとえば、次のコマンドでは \f2Main.jar\fP が作成されますが、その際、マニフェスト内の \f2Main\-Class\fP 属性値は \f2Main\fP に設定されます。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
jar cfe Main.jar Main Main.class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   305
次のコマンドを実行すると java ランタイムから直接このアプリケーションを起動できます。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
java \-jar Main.jar
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   313
あるパッケージ内にエントリポイントのクラス名が含まれている場合、ドット (「.」) 、スラッシュ (「/」) のいずれかの文字をその区切り文字として使用できます。たとえば、 \f2Main.class\fP が \f2foo\fP という名前のパッケージに含まれている場合、エントリポイントは次のようにして指定できます。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
jar \-cfe Main.jar foo/Main foo/Main.class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   321
または 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
jar \-cfe Main.jar foo.Main foo/Main.class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   329
\f3注:\ \fP \f2\-m\fP オプションと \f2\-e\fP オプションの両方を同時に指定した場合、指定したマニフェストにも \f2Main\-Class\fP 属性が含まれていれば、 \f2Main.class\fP の指定があいまいになってエラーや発生し、JAR の作成処理や更新処理が異常終了します。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   330
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   331
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   332
\-C \ dir 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   333
\f2jar\fP コマンドの実行中に後続の \f2inputfiles\fP 引数を処理するときに、一時的にディレクトリを変更します (cd \f2dir\fP)。この処理は、UNIX の \f2tar\fP ユーティリティーの \f2\-C\fP オプションの機能に類似しています。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   334
.br
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   335
.br
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   336
たとえば、次のコマンドは、\f2classes\fP ディレクトリに移動し、そのディレクトリから \f2bar.class\fP を \f2foo.jar\fP に追加します。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
jar uf foo.jar \-C classes bar.class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   344
次のコマンドでは、\f2classes\fP ディレクトリに移動し、\f2classes\fP ディレクトリ内のすべてのファイルを \f2foo.jar\fP に追加します (jar ファイルには classes ディレクトリを作成しません)。次に元のディレクトリに戻ってから、\f2bin\fP ディレクトリに移動し、\f2xyz.class\fP を \f2foo.jar\fP に追加します。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
.nf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
\f3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
.fl
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   348
jar uf foo.jar \-C classes .\-C bin xyz.class
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
.fl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
\fP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   352
\f2classes\fP にファイル \f2bar1\fP と \f2bar2\fP が格納されている場合に、 \f2jar tf foo.jar\fP 使用したときの JAR ファイルの中身を、次に示します。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
.nf
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   354
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   355
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   356
META\-INF/
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   357
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   358
META\-INF/MANIFEST.MF
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   359
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
bar1
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   361
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
bar2
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   363
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
xyz.class
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   365
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   366
\fP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   369
.TP 3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   370
\-Joption 
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   371
Java 実行環境に \f2option\fP を渡します。 \f2option\fP には、「Java アプリケーション起動ツール」のリファレンスページに記載されているオプションを 1 つ指定します。たとえば、 \f4\-J\-Xmx48M\fP と指定すると、最大メモリーが 48M バイトに設定されます。\f2\-J\fP を使って背後の実行環境にオプションを渡すことはよく行われています。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
.RE
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   373
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   374
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   375
.SH "コマンド行引数ファイル"
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   376
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   377
jar のコマンド行を短くしたり簡潔にしたりするために、jar コマンドに対する引数 (\-J オプションを除く) を含む 1 つ以上の \f2ファイルを\fP 指定することが \f2できます\fP 。これにより、任意の長さの jar コマンドを作成でき、オペレーティングシステムによるコマンド行の制限から解放されます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   378
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   379
引数ファイルにはオプションとファイル名を含めることができます。ファイル内の各引数は、スペースまたは改行で区切ります。引数ファイル内のファイル名は、現在のディレクトリから見た相対パスになります。引数ファイルの位置から見た相対パスではありません。ワイルドカード (*) は、通常ならばオペレーティングシステムシェルによってあらゆる文字に解釈されますが、この場合はそのようには解釈されません。引数ファイル内の引数で \f2@\fP 文字を使用して、複数のファイルを再帰的に解釈することはサポートされていません。また、\f2\-J\fP オプションもサポートされていません。このオプションは起動ツールに渡されますが、起動ツールでは引数ファイルをサポートしていないからです。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   380
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   381
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   382
\f2jar\fP を実行するときに、各引数ファイルのパスとファイル名の先頭に \f2@\fP 文字を付けて渡します。 \f2jar\fP は、\f2@\fP 文字で始まる引数を見つけると、そのファイルの内容を展開して引数リストに挿入します。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   383
.br
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   384
.br
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   385
次の例で、 \f2classes.list\fP には、 \f2find\fP コマンドによって出力されたファイルの名前が格納されます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   386
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   387
.nf
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
\f3
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   389
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   390
% find \fP\f3.\fP \-name '*.class' \-print > classes.list
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   391
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   392
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   393
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   394
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   395
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   396
次に、引数ファイル構文を使用して \f2classes.list\fP を jar に渡すことで、 \f2そのリスト\fP に対して \f2jar\fP コマンドを実行できます。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   398
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   399
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   400
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   401
% jar cf my.jar @classes.list
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   402
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   403
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   404
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   405
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   406
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   407
引数ファイルはパスを指定できますが、相対パスが記述された引数ファイル内のすべてのファイル名は、渡されたパスに対して相対的ではなく、現在の作業ディレクトリに相対的となります。次はその例です。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   408
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   409
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   410
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   411
% jar @path1/classes.list
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   412
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   413
\fP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
.fi
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   415
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   416
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   417
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   418
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   419
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   420
.SH "例"
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   421
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   422
特定のディレクトリ内のすべてのファイルをアーカイブに追加する (そのアーカイブがすでに存在する場合は、その内容を上書きする) には、次のようにします。\f2\-v\fP オプションを使用して情報を詳細に列挙するように指定すると、サイズや最新の更新日など、アーカイブ内のファイルについての詳細情報が表示されます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   423
.nf
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
\f3
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   425
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   426
% ls
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   427
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   428
1.au          Animator.class    monkey.jpg
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   429
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   430
2.au          Wave.class        spacemusic.au
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   431
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   432
3.au          at_work.gif
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   433
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   435
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   436
% jar cvf bundle.jar *
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   437
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
added manifest
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   439
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   440
adding: 1.au(in = 2324) (out= 67)(deflated 97%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   441
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   442
adding: 2.au(in = 6970) (out= 90)(deflated 98%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   443
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   444
adding: 3.au(in = 11616) (out= 108)(deflated 99%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   445
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   446
adding: Animator.class(in = 2266) (out= 66)(deflated 97%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   447
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   448
adding: Wave.class(in = 3778) (out= 81)(deflated 97%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   449
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   450
adding: at_work.gif(in = 6621) (out= 89)(deflated 98%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   451
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   452
adding: monkey.jpg(in = 7667) (out= 91)(deflated 98%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   453
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   454
adding: spacemusic.au(in = 3079) (out= 73)(deflated 97%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   455
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   456
\fP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
.fi
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   458
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   459
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   460
すでに画像、オーディオファイル、およびクラス用のサブディレクトリに分けている場合は、これらを単一の JAR ファイルに結合できます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   461
.nf
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
\f3
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   463
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   464
% ls \-F
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   465
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   466
audio/ classes/ images/
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   467
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   468
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   469
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   470
% jar cvf bundle.jar audio classes images
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   471
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   472
added manifest
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   473
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   474
adding: audio/(in = 0) (out= 0)(stored 0%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   475
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   476
adding: audio/1.au(in = 2324) (out= 67)(deflated 97%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   477
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   478
adding: audio/2.au(in = 6970) (out= 90)(deflated 98%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   479
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   480
adding: audio/3.au(in = 11616) (out= 108)(deflated 99%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   481
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   482
adding: audio/spacemusic.au(in = 3079) (out= 73)(deflated 97%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   483
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   484
adding: classes/(in = 0) (out= 0)(stored 0%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   485
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   486
adding: classes/Animator.class(in = 2266) (out= 66)(deflated 97%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   487
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   488
adding: classes/Wave.class(in = 3778) (out= 81)(deflated 97%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   489
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   490
adding: images/(in = 0) (out= 0)(stored 0%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   491
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   492
adding: images/monkey.jpg(in = 7667) (out= 91)(deflated 98%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   493
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   494
adding: images/at_work.gif(in = 6621) (out= 89)(deflated 98%)
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   495
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   496
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   497
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   498
% ls \-F
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   499
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   500
audio/ bundle.jar classes/ images/
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   501
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   502
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   503
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   504
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   505
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   506
JAR ファイルのエントリ名を表示するには、「\f2t\fP」オプションを使用します。 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
.nf
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   508
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   509
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
% jar tf bundle.jar
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   511
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   512
META\-INF/
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   513
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   514
META\-INF/MANIFEST.MF
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   515
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
audio/1.au
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   517
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
audio/2.au
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   519
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
audio/3.au
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   521
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
audio/spacemusic.au
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   523
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
classes/Animator.class
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   525
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
classes/Wave.class
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   527
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
images/monkey.jpg
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   529
.fl
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
images/at_work.gif
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   531
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   532
\fP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
.fi
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   534
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   535
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   536
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   537
クラスロードを高速にするためにインデックスファイルを JAR ファイルに追加するには、「\f2i\fP」オプションを使用します。
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
.br
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   540
例:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
.br
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   544
たとえば、株取引アプリケーションの内部依存しているクラスを、\f2main.jar\fP、\f2buy.jar\fP、および \f2sell.jar\fP という 3 つの JAR ファイルに分割したとします。
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   545
.br
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   546
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   547
.LP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   548
.br
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   549
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   551
\f2main.jar\fP のマニフェストの \f2Class\-path\fP 属性に次のように指定した場合、 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   552
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   553
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   554
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   555
Class\-Path: buy.jar sell.jar
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   556
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   557
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   558
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   559
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   560
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   561
\f2\-i\fP オプションを使用すれば、アプリケーションのクラスの 読み込みを高速化できます。 
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   562
.nf
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   563
\f3
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   564
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   565
% jar i main.jar
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   566
.fl
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   567
\fP
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   568
.fi
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   569
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   570
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   571
\f2INDEX.LIST\fP ファイルが \f2META\-INF\fP ディレクトリに挿入されます。この結果、アプリケーションのクラスローダーによってクラスまたはリソースの検索が行われるときに、適切な jar ファイルがダウンロードされます。 
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   572
.SH "関連項目"
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   575
.na
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   576
\f2JAR ファイルの概要\fP @
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
http://java.sun.com/javase/6/docs/technotes/guides/jar/jarGuide.html
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   579
.LP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   581
.na
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   582
\f2JAR ファイルの仕様\fP @
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
.fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   585
.LP
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   586
.LP
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   587
.na
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   588
\f2JarIndex の仕様\fP @
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   589
.fi
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   590
http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR_Index
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   591
.LP
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
.LP
2692
345bc8d65b19 6837214: Update JDK7 man pages
tbell
parents: 2
diff changeset
   593
.na
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   594
\f2JAR チュートリアル\fP @
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
.fi
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   596
http://download.oracle.com/javase/tutorial/deployment/jar/index.html
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
.LP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
.LP
9352
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   599
pack200(1)
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   600
.LP
cabba0c0f3ee 7025070: man page localization broken in jdk7
ogino
parents: 5865
diff changeset
   601