app store.
This commit is contained in:
@@ -0,0 +1,900 @@
|
||||
." Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH java 1 "11 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "NAME"
|
||||
java \- Javaアプリケーションを起動します。
|
||||
.SH "形式"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java [ \fIoptions\fR ] class [ \fIargument \&.\&.\&.\fR ]
|
||||
java [ \fIoptions\fR ] \-jar file\&.jar [ \fIargument \&.\&.\&.\fR ]
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
\fIオプション\fR
|
||||
.RS 4
|
||||
コマンドライン・オプション。オプションを参照してください。
|
||||
.RE
|
||||
.PP
|
||||
クラス
|
||||
.RS 4
|
||||
コールするクラスの名前。
|
||||
.RE
|
||||
.PP
|
||||
\fIfile\&.jar\fR
|
||||
.RS 4
|
||||
コールするJARファイルの名前。\fI\-jar\fRコマンドでのみ使用されます。
|
||||
.RE
|
||||
.PP
|
||||
\fI引数\fR
|
||||
.RS 4
|
||||
\fImain\fR関数に渡される引数。
|
||||
.RE
|
||||
.SH "説明"
|
||||
.PP
|
||||
\fIjava\fRコマンドはJavaアプリケーションを開始します。Java Runtime Environmentを起動した後、指定されたクラスをロードし、そのクラスの\fImain\fRメソッドをコールすることにより、これを行います。
|
||||
.PP
|
||||
このメソッドは、publicおよびstaticとして宣言する必要があります。また、値は返せません。さらに、String配列をパラメータとして指定できる必要があります。メソッド宣言は次の形式を含みます。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
public static void main(String args[]
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
デフォルトでは、オプションのない最初の引数が、コールされるクラスの名前になります。完全修飾クラス名を使用する必要があります。\fI\-jar\fRオプションを指定した場合、コマンドライン・オプション以外の最初の引数が、アプリケーションのクラス・ファイルとリソース・ファイルを含むJARファイルの名前になります。この場合、マニフェストのMain\-Classヘッダーで指定されたクラスが起動クラスになります。
|
||||
.PP
|
||||
Java Runtimeは、ブートストラップ・クラス・パス、インストール済拡張機能およびユーザー・クラス・パスの3箇所から起動クラスと他の使用されているクラスを検索します。
|
||||
.PP
|
||||
クラス名またはJARファイル名の後にある、コマンドライン・オプション以外の引数は、\fImain\fR関数に渡されます。
|
||||
.SH "オプション"
|
||||
.PP
|
||||
起動ツールには、現在のランタイム環境でサポートされる標準オプションのセットがあります。
|
||||
.PP
|
||||
また、仮想マシンの現在の実装では、非標準オプションのセットもサポートされます。これは、将来のリリースで変更される可能性があります。非標準オプションを参照してください。
|
||||
.SS "標準オプション"
|
||||
.PP
|
||||
\-client
|
||||
.RS 4
|
||||
Java HotSpot VMクライアントを選択します。64ビット対応JDKは現時点では、このオプションを無視し、かわりにJava Hotspot Server VMを使用します。
|
||||
.sp
|
||||
デフォルトのJava VM選択は、次の\fI「サーバークラス・マシンの検出」\fRページを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guides/vm/server\-class\&.html
|
||||
.RE
|
||||
.PP
|
||||
\-server
|
||||
.RS 4
|
||||
Java HotSpot VMサーバーを選択します。64ビット対応JDK上では、サポートされるのはJava Hotspot Server VMのみであるため、\fI\-\fR\fIserver\fRオプションが暗黙的に選択されます。
|
||||
.sp
|
||||
デフォルトのJava VM選択は、次の「サーバークラス・マシンの検出」ページを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guides/vm/server\-class\&.html
|
||||
.RE
|
||||
.PP
|
||||
\-agentlib:\fIlibname\fR[\fI=options\fR]
|
||||
.RS 4
|
||||
次の例のようなネイティブ・エージェント・ライブラリ\fIlibname\fRをロードします。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-agentlib:hprof
|
||||
|
||||
\-agentlib:jdwp=help
|
||||
|
||||
\-agentlib:hprof=help
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
次の\fI「JVMTIエージェント・コマンドライン・オプション」\fRを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/platform/jvmti/jvmti\&.html#starting
|
||||
.RE
|
||||
.PP
|
||||
\-agentpath:\fIpathname\fR[\fI=options\fR]
|
||||
.RS 4
|
||||
フル\fIパス名\fRを使用して、ネイティブ・エージェント・ライブラリをロードします。次の\fI「JVMTIコマンドライン・オプション」\fRを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/platform/jvmti/jvmti\&.html#starting
|
||||
.RE
|
||||
.PP
|
||||
\-classpath \fIclasspath\fR, \-cp \fIclasspath\fR
|
||||
.RS 4
|
||||
クラス・ファイルを検索するディレクトリ、JARファイルおよびZIPアーカイブのリストを指定します。
|
||||
\fIクラス・パス・エントリはコロン(:)で区切ります。\fR\fI\-classpath\fRまたは\fI\-cp\fRを指定すると、このオプションの値によって\fICLASSPATH\fR環境変数の設定がオーバーライドされます。
|
||||
.sp
|
||||
\fI\-classpath\fRと\fI\-cp\fRが使用されず、\fICLASSPATH\fRが設定されていない場合、ユーザー・クラス・パスは現在のディレクトリ(\&.)から構成されます。
|
||||
.sp
|
||||
便宜上、\fI*\fRのベース名を含むクラス・パス要素は、\&.jarまたは\&.JARを拡張子に持つディレクトリ内のすべてのファイルのリストを指定するのと同等とみなされます。Javaプログラムは2つの呼出しの違いを認識できません。
|
||||
.sp
|
||||
たとえば、ディレクトリmydirにa\&.jarとb\&.JARが含まれている場合、クラス・パス要素\fImydir/*\fRはA\&.jar:b\&.JARに展開されますが、JARファイルの順番は未指定となります。このリストには、隠しファイルも含め、指定されたディレクトリ内のすべてのJARファイルが含まれます。\fI*\fRのみからなるクラス・パス・エントリは、現在のディレクトリ内のすべてのJARファイルのリストに展開されます。\fICLASSPATH\fR環境変数も、定義時には同様に展開されます。クラス・パス・ワイルドカード拡張は、Java VMの開始前に行われます。Javaプログラムは、環境を問い合せる場合を除き、拡張されていないワイルド・カードを参照しません。たとえば、\fISystem\&.getenv("CLASSPATH")\fRをコールして問い合せる場合です。
|
||||
.RE
|
||||
.PP
|
||||
\-D\fIproperty=value\fR
|
||||
.RS 4
|
||||
システム・プロパティの値を設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-d32
|
||||
.RS 4
|
||||
アプリケーションを32ビット環境で実行します。32ビット環境がインストールされていないかサポートされていない場合は、エラーが報告されます。デフォルトでは、64ビット専用システムが使用されている場合を除き、アプリケーションは32ビット環境で実行されます。
|
||||
.RE
|
||||
.PP
|
||||
\-d64
|
||||
.RS 4
|
||||
アプリケーションを64ビット環境で実行します。64ビット環境がインストールされていないかサポートされていない場合は、エラーが報告されます。デフォルトでは、64ビット専用システムが使用されている場合を除き、アプリケーションは32ビット環境で実行されます。
|
||||
.sp
|
||||
現在のところ、Java HotSpot Server VMのみが64ビットの操作をサポートしているため、\fI\-d64\fR使用時には\fI\-server\fRオプションが暗黙的に使用されます。\fI\-d64\fR使用時には、\fI\-client\fRオプションは無視されます。この仕様は、将来のリリースでは変更になる可能性があります。
|
||||
.RE
|
||||
.PP
|
||||
\-disableassertions[:\fIpackage name\fR"\&.\&.\&." | :\fIclass name\fR ], \-da[:\fIpackage name\fR"\&.\&.\&." | :\fIclass name\fR ]
|
||||
.RS 4
|
||||
アサーションを無効にします。これがデフォルトです。
|
||||
.sp
|
||||
引数なしの\fIdisableassertions\fRまたは\fI\-da\fRを指定すると、アサーションが無効になります。「\fI\&.\&.\&.\fR」で終わる引数を1つ指定すると、指定したパッケージとそのサブパッケージ内でアサーションが無効になります。引数として\fI"\&.\&.\&."\fRを指定すると、現在の作業ディレクトリにある名前のないパッケージ内でアサーションが無効になります。「\fI\&.\&.\&.\fR」で終わらない引数を1つ指定すると、指定したクラス内でアサーションが無効になります。
|
||||
.sp
|
||||
パッケージ\fIcom\&.wombat\&.fruitbat\fR内ではアサーションを有効にし、クラス\fIcom\&.wombat\&.fruitbat\&.Brickbat\fR内ではアサーションを無効にしたうえで、プログラムを実行するには、次のようなコマンドを使用します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat <Main Class>
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
\fI\-disableassertions\fRおよび\fI\-da\fRスイッチは、すべてのクラス・ローダーおよびシステム・クラスに適用されます。システム・クラスにはクラス・ローダーはありません。ただし、このルールには1つ例外があります。それは、引数なしの形式でこのスイッチを指定すると、その指定がシステムに適用されない、ということです。この例外を利用すれば、システム・クラスを除くすべてのクラスでアサーションを簡単に有効にすることができます。\fI\-disablesystemassertions\fRオプションは、すべてのシステム・クラスでアサーションを有効にする別のスイッチを提供します。
|
||||
.RE
|
||||
.PP
|
||||
\-enableassertions[:\fIpackage name\fR"\&.\&.\&." | :\fIclass name\fR ], \-ea[:\fIpackage name\fR"\&.\&.\&." | :\fIclass name\fR ]
|
||||
.RS 4
|
||||
アサーションを有効にします。アサーションは、デフォルトでは無効になっています。
|
||||
.sp
|
||||
引数なしの\fIenableassertions\fRまたは\fI\-ea\fRを指定すると、アサーションが有効になります。「\fI\&.\&.\&.\fR」で終わる引数を1つ指定すると、指定したパッケージとそのサブパッケージ内でアサーションが有効になります。引数として\fI"\&.\&.\&."\fRを指定すると、現在の作業ディレクトリにある名前のないパッケージ内でアサーションが有効になります。「\fI\&.\&.\&.\fR」で終わらない引数を1つ指定すると、指定したクラス内でアサーションが有効になります。
|
||||
.sp
|
||||
単一コマンドにこれらのスイッチのインスタンスを複数指定した場合は、指定したスイッチが順番に処理されてからクラスがロードされます。したがって、たとえば、パッケージcom\&.wombat\&.fruitbat(サブパッケージを含む)内でのみアサーションを有効にしてプログラムを実行するには、次のようなコマンドを使用します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. <Main Class>
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
\fI\-enableassertions\fRおよび\fI\-ea\fRスイッチは、すべてのクラス・ローダーおよびシステム・クラスに適用されます。システム・クラスにはクラス・ローダーはありません。ただし、このルールには1つ例外があります。それは、引数なしの形式でこのスイッチを指定すると、その指定がシステムに適用されない、ということです。この例外を利用すれば、システム・クラスを除くすべてのクラスでアサーションを簡単に有効にすることができます。\fI\-enablesystemassertions\fRオプションは、すべてのシステム・クラスでアサーションを有効にする別のスイッチを提供します。
|
||||
.RE
|
||||
.PP
|
||||
\-enablesystemassertions, \-esa
|
||||
.RS 4
|
||||
すべてのシステム・クラス内でアサーションを有効にします。つまり、システム・クラスについてアサーションのデフォルト・ステータスをtrueに設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-disablesystemassertions, \-dsa
|
||||
.RS 4
|
||||
すべてのシステム・クラス内でアサーションを無効にします。
|
||||
.RE
|
||||
.PP
|
||||
\-helpまたは\-?
|
||||
.RS 4
|
||||
使用方法を表示して終了します。
|
||||
.RE
|
||||
.PP
|
||||
\-jar
|
||||
.RS 4
|
||||
JARファイルにカプセル化されたプログラムを実行します。最初の引数は、起動クラスの名前ではなく、JARファイルの名前にします。このオプションが機能するには、JARファイルのマニフェストに\fIMain\-Class\fR:
|
||||
\fIclassname\fRという形式の行を指定する必要があります。\fIclassname\fRには、アプリケーションの開始位置として機能する\fIpublic static void main(String[] args)\fRメソッドを含むクラスを指定します。
|
||||
.sp
|
||||
このオプションを使用すると、指定したJARファイルがすべてのユーザー・クラスのソースになり、ユーザー・クラス・パスの他の設定は無視されます。
|
||||
.sp
|
||||
\fIjava \-jar\fRオプションで実行できるJARファイルは、実行権限のセットを保持しています。このため、\fIjava \-jar\fRを使用しないで実行することも可能です。次の「JARファイルの概要」を参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guides/jar/jarGuide\&.html
|
||||
.RE
|
||||
.PP
|
||||
\-javaagent:\fIjarpath\fR[\fI=options\fR]
|
||||
.RS 4
|
||||
Javaプログラミング言語エージェントをロードします。
|
||||
.RE
|
||||
.PP
|
||||
\-jre\-restrict\-search
|
||||
.RS 4
|
||||
ユーザー・プライベートなJREをバージョン検索に含めます。
|
||||
.RE
|
||||
.PP
|
||||
\-no\-jre\-restrict\-search
|
||||
.RS 4
|
||||
ユーザー・プライベートなJREをバージョン検索から除外します。
|
||||
.RE
|
||||
.PP
|
||||
\-showversion
|
||||
.RS 4
|
||||
バージョン情報を表示して続行します。(も参照してください。)
|
||||
.RE
|
||||
.PP
|
||||
\-splash:\fIimagepath\fR
|
||||
.RS 4
|
||||
\fIimagepath\fRに指定された画像を含むスプラッシュ画面を表示します。
|
||||
.RE
|
||||
.PP
|
||||
\-verbose, \-verbose:class
|
||||
.RS 4
|
||||
クラスがロードされるたびにクラスに関する情報を表示します。
|
||||
.RE
|
||||
.PP
|
||||
\-verbose:gc
|
||||
.RS 4
|
||||
ガベージ・コレクション・イベントが発生するたびに報告します。
|
||||
.RE
|
||||
.PP
|
||||
\-verbose:jni
|
||||
.RS 4
|
||||
ネイティブ・メソッドの使用およびその他のJava Native Interfaceアクティビティに関する情報を報告します。
|
||||
.RE
|
||||
.PP
|
||||
\-version
|
||||
.RS 4
|
||||
バージョン情報を表示して終了します。\fI\-showversion\fRオプションも参照してください。
|
||||
.RE
|
||||
.PP
|
||||
\-version:\fIrelease\fR
|
||||
.RS 4
|
||||
コマンドラインに指定されたクラスまたはJARファイルが、releaseで指定されたバージョンを必要としていることを示します。コールされた\fIjava\fRコマンドのバージョンがこの指定内容を満たさず、かつ適切な実装がシステム上で見つかった場合には、その適切な実装が使用されます。
|
||||
.sp
|
||||
\fIrelease\fRオプションでは、特定のバージョンと、バージョン文字列と呼ばれるバージョンのリストを指定します。バージョン文字列は、いくつかのバージョン範囲を空白で区切った形式の順序付きリストです。バージョン範囲は、\fIバージョンID\fR、\fIバージョンID\fRとそれに続くアスタリスク(\fI*\fR)、\fIバージョンID\fRとそれに続くプラス記号(\fI+\fR)、またはアンパサンド(\fI&\fR)を使用して結合された2つの\fIバージョンID\fRから構成されるバージョン範囲です。次の例のように、アスタリスクはプレフィックス一致を、プラス記号は指定されたバージョン以上を、アンパサンドは2つのバージョン範囲の論理\fIand\fRをそれぞれ意味します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-version:"1\&.6\&.0_13 1\&.6* & 1\&.6\&.0_10+"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
前の例の意味は、バージョン1\&.6\&.0_13、または1\&.6を\fIバージョンID\fRプレフィックスに持つ1\&.6\&.0_10以上のバージョンをクラスまたはJARファイルが必要としている、ということです。バージョン文字列の厳密な構文や定義については、「Javaネットワーク起動プロトコル & API仕様(JSR\-56)」の「付録A」を参照してください。
|
||||
.sp
|
||||
JARファイルの場合は、バージョン要件をコマンドラインに指定するよりも、JARファイルのマニフェスト内に指定することが推奨されています。
|
||||
.sp
|
||||
このオプションの使用に関する重要なポリシー情報は、注意を参照してください。
|
||||
.RE
|
||||
.SS "非標準オプション"
|
||||
.PP
|
||||
\-X
|
||||
.RS 4
|
||||
非標準オプションに関する情報を表示して終了します。
|
||||
.RE
|
||||
.PP
|
||||
\-Xint
|
||||
.RS 4
|
||||
インタプリタ専用モードで動作します。ネイティブ・コードへのコンパイルは無効になり、すべてのバイトコードがインタプリタによって実行されます。Java HotSpot VMクライアントに対応するコンパイラが提供するパフォーマンス上の利点は、このモードでは実現されません。
|
||||
.RE
|
||||
.PP
|
||||
\-Xbatch
|
||||
.RS 4
|
||||
バックグラウンド・コンパイルを無効にします。通常、Java VMでは、バックグラウンド・コンパイルが終了するまで、メソッドをバックグラウンド・タスクとしてコンパイルし、インタプリタ・モードでメソッドを実行します。\-Xbatchフラグを指定すると、バックグラウンド・コンパイルが無効になり、すべてのメソッドのコンパイルが完了するまでフォアグラウンド・タスクとして処理されます。
|
||||
.RE
|
||||
.PP
|
||||
\-X\fIbootclasspath\fR:\fIbootclasspath\fR
|
||||
.RS 4
|
||||
\fIブート・クラス・ファイルを検索するディレクトリ、JARファイルおよびZIPアーカイブのコロンで区切られたリストを指定します。\fR指定したパスに存在するブート・クラス・ファイルが、JavaプラットフォームJDKに含まれるブート・クラス・ファイルのかわりに使用されます。
|
||||
.sp
|
||||
rt\&.jar内のクラスをオーバーライドする目的でこのオプションを使用するアプリケーションは、システムに配置しないでください。Java Runtime Environmentバイナリ・コード・ライセンス違反になります。
|
||||
.RE
|
||||
.PP
|
||||
\-X\fIbootclasspath\fR/a:\fIpath\fR
|
||||
.RS 4
|
||||
ディレクトリ、JARファイルおよびZIPアーカイブのパスをコロンで区切って指定します。パスはデフォルトのブートストラップ・クラス・パスの後に追加されます。
|
||||
.RE
|
||||
.PP
|
||||
\-X\fIbootclasspath\fR/p:\fIpath\fR
|
||||
.RS 4
|
||||
ディレクトリ、JARファイルおよびZIPアーカイブのパスをコロンで区切って指定します。パスはデフォルトのブートストラップ・クラス・パスの前に追加されます。
|
||||
.sp
|
||||
rt\&.jar内のクラスをオーバーライドする目的で、このオプションを使用するアプリケーションをデプロイしないでください。Java Runtime Environmentバイナリ・コード・ライセンスに違反します。
|
||||
.RE
|
||||
.PP
|
||||
\-Xcheck:jni
|
||||
.RS 4
|
||||
Java Native Interface (JNI)機能に対して追加チェックを行います。具体的には、Java仮想マシンはJNIリクエストを処理する前に、JNI関数に渡されるパラメータと、実行環境のデータを検証します。無効なデータが見つかった場合は、ネイティブ・コードに問題があることを示しているため、Java仮想マシンは致命的エラーを発生して終了します。このオプションを使用すると、パフォーマンス低下が予想されます。
|
||||
.RE
|
||||
.PP
|
||||
\-Xfuture
|
||||
.RS 4
|
||||
クラスとファイルの形式を厳密にチェックします。下位互換性を保つため、SDK仮想マシンが実行するデフォルトの形式チェックは、JDKソフトウェアのバージョン1\&.1\&.xが実行するチェックと同程度の厳密さになっています。\fI\-Xfuture\fRオプションを指定すると、クラス・ファイル形式の仕様への準拠を強化するためのより厳密なチェックが有効になります。Javaアプリケーション起動ツールの将来のリリースでは、より厳密なチェックがデフォルトになるため、新しいコードを開発するときにはこのフラグを使用することをお薦めします。
|
||||
.RE
|
||||
.PP
|
||||
\-Xnoclassgc
|
||||
.RS 4
|
||||
クラスのガベージ・コレクションを無効にします。このオプションを使用すると、ロード済クラスからメモリーが回復されることがなくなるため、全体的なメモリー使用量が増大します。この場合、アプリケーションによっては\fIOutOfMemoryError\fRがスローされる可能性があります。
|
||||
.RE
|
||||
.PP
|
||||
\-Xincgc
|
||||
.RS 4
|
||||
インクリメンタル・ガベージ・コレクタを有効にします。インクリメンタル・ガベージ・コレクタは、デフォルトでは無効になっています。有効にすると、プログラムの実行中にガベージ・コレクションによる一時停止が発生しなくなります。インクリメンタル・ガベージ・コレクタは、プログラムと同時に実行することがあり、この場合、プログラムの利用できるプロセッサ能力が低下します。
|
||||
.RE
|
||||
.PP
|
||||
\-Xloggc:\fIfile\fR
|
||||
.RS 4
|
||||
\fI\-verbose:gc\fRと同様にガベージ・コレクション・イベントが発生するたびに報告しますが、そのデータをファイルに記録します。\fI\-verbose:gc\fRを指定したときに報告される情報の他に、報告される各イベントの先頭に、最初のガベージ・コレクション・イベントからの経過時間(秒単位)が付け加えられます。
|
||||
.sp
|
||||
ネットワークのレスポンス時間によってJava VMの実行速度が低下するのを避けるため、このファイルの格納先は、常にローカル・ファイル・システムにしてください。ファイル・システムが満杯になると、ファイルは切り詰められ、そのファイルにデータが引続き記録されます。このオプションと\fI\-verbose:gc\fRの両方がコマンドラインに指定されている場合は、このオプションが優先されます。
|
||||
.RE
|
||||
.PP
|
||||
\-Xmnsizeまたは\-XX:\fINewSize\fR
|
||||
.RS 4
|
||||
若い世代(ナーサリ)のサイズを設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-Xms\fIn\fR
|
||||
.RS 4
|
||||
メモリー割当てプールの初期サイズをバイト数で指定します。指定する値は、1MBより大きい1024の倍数にする必要があります。キロバイトを指定するには、文字\fIk\fRまたは\fIK\fRを付けます。メガバイトを指定するには、文字\fIm\fRまたは\fIM\fRを付けます。デフォルト値は、実行時にシステム構成に基づいて選択されます。次の\fI「ガベージ・コレクタのエルゴノミクス」\fRを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guide/vm/gc\-ergonomics\&.html
|
||||
.sp
|
||||
例:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-Xms6291456
|
||||
\-Xms6144k
|
||||
\-Xms6m
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-Xmx\fIn\fR
|
||||
.RS 4
|
||||
メモリー割当てプールの最大サイズをバイト数で指定します。指定する値は、2MBより大きい1024の倍数にする必要があります。キロバイトを指定するには、文字\fIk\fRまたは\fIK\fRを付けます。メガバイトを指定するには、文字\fIm\fRまたは\fIM\fRを付けます。デフォルト値は、実行時にシステム構成に基づいて選択されます。
|
||||
.sp
|
||||
サーバー・デプロイメントでは、\fI\-Xms\fRおよび\fI\-Xmx\fRは通常同じ値に設定されます。次の\fI「ガベージ・コレクタのエルゴノミクス」\fRを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guide/vm/gc\-ergonomics\&.html
|
||||
.sp
|
||||
例:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-Xmx83886080
|
||||
\-Xmx81920k
|
||||
\-Xmx80m
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
Solaris 7およびSolaris 8 SPARCプラットフォームの場合のこの値の上限は、およそ4000mからオーバーヘッドの量を引いたものです。Solaris 2\&.6およびx86プラットフォームの場合の上限は、およそ2000mからオーバーヘッドの量を引いたものです。Linuxプラットフォームの場合の上限は、およそ2000mからオーバーヘッドの量を引いたものです。
|
||||
.RE
|
||||
.PP
|
||||
\-Xprof
|
||||
.RS 4
|
||||
実行中のプログラムのプロファイルを生成し、プロファイル・データを標準出力に出力します。このオプションは、プログラム開発用のユーティリティとして提供されています。本番稼働システムでの使用を目的としたものではありません。
|
||||
.RE
|
||||
.PP
|
||||
\-Xrs
|
||||
.RS 4
|
||||
Java VMによるオペレーティング・システム・シグナルの使用を減らします。
|
||||
.sp
|
||||
以前のリリースでは、Javaアプリケーションを秩序正しくシャットダウンするためのシャットダウン・フック機能が追加されました。この機能により、Java VMが突然終了した場合でも、シャットダウン時にユーザー・クリーン・アップコード(データベース接続のクローズなど)を実行できるようになりました。
|
||||
.sp
|
||||
Java VMは、予期しないJava VM終了のシャットダウン・フックを実装するためにシグナルをキャッチします。Java VMは、\fISIGHUP\fR、\fISIGINT\fRおよび\fISIGTERM\fRを使用してシャットダウン・フックの実行を開始します。
|
||||
.sp
|
||||
JVMは、デバッグの目的でスレッド・スタックをダンプするという機能を実現するために、同様のメカニズムを使用します。JVMは、スレッド・ダンプを実行するために\fISIGQUIT\fRを使用します。
|
||||
.sp
|
||||
Java VMを埋め込んでいるアプリケーションは\fISIGINT\fRや\fISIGTERM\fRなどのシグナルを頻繁にトラップする必要があり、その結果Java VMのシグナル・ハンドラと衝突する可能性があります。\fI\-Xrs\fRコマンドライン・オプションを使用すると、この問題に対処できます。\fI\-Xrs\fRがJava VMで使用されている場合、\fISIGINT\fR、\fISIGTERM\fR、\fISIGHUP\fRおよび\fISIGQUIT\fRのシグナル・マスクはJava VMによって変更されず、これらのシグナルのシグナル・ハンドラはインストールされません。
|
||||
.sp
|
||||
\fI\-Xrs\fRを指定すると、次の2つの結果が生じます:
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fISIGQUIT\fRによるスレッド・ダンプは使用できません。
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
シャットダウン・フック処理の実行は、Java VMが終了しようとしている時点で\fISystem\&.exit()\fRを呼び出すなどして、ユーザー・コード側で行う必要があります。
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
\-Xss\fIn\fR
|
||||
.RS 4
|
||||
スレッドのスタック・サイズを設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:AllocationPrefetchStyle=\fIn\fR
|
||||
.RS 4
|
||||
割当中に使用されるプリフェッチのスタイルを設定します。デフォルトは2です。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+AggressiveOpts
|
||||
.RS 4
|
||||
積極的な最適化を有効にします。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+|\-DisableAttachMechanism
|
||||
.RS 4
|
||||
コマンド(\fIjmap\fRや\fIjconsole\fRなど)がJava VMに接続できるかどうかを指定します。デフォルトでは、この機能は無効になっています。つまり、次の例のように接続が有効です。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-XX:+DisableAttachMechanism
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+|\-FlightRecorder
|
||||
.RS 4
|
||||
アプリケーションの実行中に、Javaフライト・レコーダ(JFR)の使用を切り替えます。これは商用機能で、\fI\-XX:+UnlockCommercialFeatures\fRオプションを次のように指定することも必要になります。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-XX:UnlockCommercialFeatures \-XX:+FlightRecorder
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XX:FlightRecorderOptions=\fIparameter\fR=\fIvalue\fR
|
||||
.RS 4
|
||||
JFRの動作を制御するパラメータを設定します。このオプションを使用できるのは、JFRが有効な場合(\fI\-XX:+FlightRecorder\fRオプションが指定されている場合)のみです。
|
||||
.sp
|
||||
次のリストには、使用可能なすべてのJFRパラメータが含まれます。
|
||||
.PP
|
||||
defaultrecording=true|false
|
||||
.RS 4
|
||||
バックグラウンド記録が有効かどうかを指定します。デフォルトでは、このパラメータは\fIfalse\fR
|
||||
(バックグラウンド記録は無効)に設定されています。有効にするには、パラメータを\fItrue\fRに設定します。
|
||||
.RE
|
||||
.PP
|
||||
disk=true|false
|
||||
.RS 4
|
||||
JFRでディスクに連続記録を書き込む必要があるかどうかを指定します。デフォルトでは、このパラメータは\fIfalse\fR
|
||||
(ディスクへの連続記録は無効)に設定されています。有効にするには、パラメータを\fItrue\fRに設定します。
|
||||
.RE
|
||||
.PP
|
||||
dumponexit=true|false
|
||||
.RS 4
|
||||
JVMが制御された方式で終了したときに、JFRデータのダンプ・ファイルを生成するかどうかを指定します。デフォルトでは、このパラメータは\fIfalse\fR
|
||||
(終了時にダンプ・ファイルは生成されない)に設定されています。有効にするには、パラメータを\fItrue\fRに設定します。
|
||||
.sp
|
||||
ダンプ・ファイルは、\fIdumponexitpath\fRパラメータによって指定された場所に書き込まれます。
|
||||
.RE
|
||||
.PP
|
||||
dumponexitpath=\fIpath\fR
|
||||
.RS 4
|
||||
\fIdumponexit=true\fRパラメータが設定されている場合に、JVMが制御された方式で終了するときに作成される、JFRデータを含むダンプ・ファイルのパスと名前を指定します。指定したパスがディレクトリの場合、JVMは作成日時を示すファイル名を割り当てます。指定したパスにすでに存在するファイルのファイル名が含まれる場合、指定したファイル名に日付およびタイム・スタンプを追加して新しいファイルが作成されます。
|
||||
.RE
|
||||
.PP
|
||||
globalbuffersize=\fIsize\fR
|
||||
.RS 4
|
||||
データ保存に使用する総プライマリ・メモリー量(MB単位)を指定します。デフォルトでは、サイズは10MBに設定されています。
|
||||
.RE
|
||||
.PP
|
||||
maxage=\fItime\fR
|
||||
.RS 4
|
||||
デフォルト記録のディスク・データの最大保持時間(分単位)を指定します。デフォルトでは、最大保持時間は15分に設定されています。このパラメータは、\fIdisk=true\fRパラメータが設定されている場合のみ有効です。
|
||||
.RE
|
||||
.PP
|
||||
maxchunksize=\fIsize\fR
|
||||
.RS 4
|
||||
記録内のデータ・チャンクの最大サイズ(MB単位)を指定します。デフォルトでは、データ・チャンクの最大サイズは12MBに設定されています。
|
||||
.RE
|
||||
.PP
|
||||
maxsize=\fIsize\fR
|
||||
.RS 4
|
||||
デフォルト記録のディスク・データの最大サイズ(MB単位)を指定します。デフォルトでは、ディスク・データの最大サイズは制限されていません。
|
||||
.sp
|
||||
このパラメータは、\fIdisk=true\fRパラメータが設定されている場合にのみ有効です。
|
||||
.RE
|
||||
.PP
|
||||
repository=\fIpath\fR
|
||||
.RS 4
|
||||
一時ディスク記憶域のリポジトリ(ディレクトリ)を指定します。デフォルトでは、システムの一時ディレクトリが使用されます。
|
||||
.RE
|
||||
.PP
|
||||
settings=\fIpath\fR
|
||||
.RS 4
|
||||
イベント設定ファイル(タイプはJFS)のパスと名前を指定します。デフォルトでは、\fIJAVA_HOME/jre/lib/jfr\fRにある\fIdefault\&.jfs\fRファイルが使用されます。
|
||||
.RE
|
||||
.PP
|
||||
threadbuffersize=\fIsize\fR
|
||||
.RS 4
|
||||
スレッドごとのローカル・バッファ・サイズ(KB単位)を指定します。このパラメータの値が高いと、競合することなく、より多くのデータを収集してグローバル記憶域にフラッシュすることができます。スレッドが多い環境ではアプリケーションのフットプリントも増加します。デフォルトでは、ローカル・バッファ・サイズは5KBに設定されています。
|
||||
.RE
|
||||
.sp
|
||||
カンマで区切って、複数のパラメータの値を指定できます。たとえば、ディスクに連続記録を書き込み、データ・チャンクの最大サイズを10MBに設定するようにJFRに指示するには、次のように指定します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-XX:FlightRecorderOptions=disk=true,maxchunksize=10M
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XXLargePageSizeInBytes=\fIn\fR
|
||||
.RS 4
|
||||
ラージ・ページの最大サイズを指定します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:MaxGCPauseMillis=\fIn\fR
|
||||
.RS 4
|
||||
最大GC休止時間のターゲットを設定します。
|
||||
.sp
|
||||
これはソフト・ゴールのため、Java VMは実現のために最善の努力をします。デフォルトで設定されている最大値はありません。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:NewSize
|
||||
.RS 4
|
||||
若い世代(ナーサリ)のサイズを設定します。\fI\-Xmnsize\fRと同じです。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:ParallelGCThreads=\fIn\fR
|
||||
.RS 4
|
||||
パラレル・コレクタ内のGCスレッドの数を設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:PredictedClassLoadCount=\fIn\fR
|
||||
.RS 4
|
||||
このオプションでは、最初に\fIUnlockExperimentalVMOptions\fRフラグを設定する必要があります。アプリケーションが多数のクラスをロードする場合で、特に\fIclass\&.forName()\fRが頻繁に使用される場合は\fIPredictedClassLoadCount\fRフラグを使用します。推奨値は、\fI\-verbose:class\fRからの出力に示されているロード済クラスの数です。
|
||||
.sp
|
||||
例:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-XX:+UnlockExperimentalVMOptions \-XX:PredictedClassLoadCount=60013
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+PrintCompilation
|
||||
.RS 4
|
||||
Java HotSpot VMダイナミック・ランタイム・コンパイラからの詳細出力を印刷します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+PrintGCDetails \-XX:+PrintGCTimeStamps
|
||||
.RS 4
|
||||
ガベージ・コレクション出力をタイムスタンプとともに印刷します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:SoftRefLRUPolicyMSPerMB=0
|
||||
.RS 4
|
||||
このフラグは、ソフトウェア参照の積極的処理を有効にします。このフラグは、ソフトウェア参照カウントがJava HotSpot VMガベージ・コレクタに影響する場合に使用します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:StartFlightRecording=\fIparameter\fR=\fIvalue\fR
|
||||
.RS 4
|
||||
JavaアプリケーションのJFR記録を開始します。このオプションは、実行時にJFRを起動する\fIstart_flightrecording\fR診断コマンドに相当します。JFR記録の開始時に、次のパラメータを設定できます。
|
||||
.PP
|
||||
compress=true|false
|
||||
.RS 4
|
||||
\fIgzip\fRファイル圧縮ユーティリティを使用して、ディスクでJFR記録ログ・ファイル(タイプはJFR)を圧縮するかどうかを指定します。このパラメータは、\fIfilename\fRパラメータが指定されている場合のみ有効です。デフォルトでは、\fIfalse\fR
|
||||
(記録を圧縮しない)に設定されています。圧縮を有効にするには、パラメータを\fItrue\fRに設定します。
|
||||
.RE
|
||||
.PP
|
||||
defaultrecording=true|false
|
||||
.RS 4
|
||||
記録が連続的か、または限定された時間に対して実行されるかを指定します。デフォルトでは、このパラメータは\fIfalse\fR
|
||||
(記録は限定された時間に対して実行される)に設定されています。記録を連続的に実行するには、パラメータを\fItrue\fRに設定します。
|
||||
.RE
|
||||
.PP
|
||||
delay=\fItime\fR
|
||||
.RS 4
|
||||
Javaアプリケーションの起動時間と記録開始との間の遅延(ミリ秒単位)を指定します。デフォルトでは、遅延は存在せず、このパラメータは0に設定されています。
|
||||
.RE
|
||||
.PP
|
||||
duration=\fItime\fR
|
||||
.RS 4
|
||||
記録の期間(ミリ秒単位)を指定します。デフォルトでは、期間は制限されていません。
|
||||
.RE
|
||||
.PP
|
||||
filename=\fIpath\fR
|
||||
.RS 4
|
||||
JFR記録ログ・ファイルのパスと名前を指定します。
|
||||
.RE
|
||||
.PP
|
||||
name=\fIidentifier\fR
|
||||
.RS 4
|
||||
JFR記録の識別子を指定します。デフォルトでは、Recording xに設定されています
|
||||
.RE
|
||||
.PP
|
||||
maxage=\fItime\fR
|
||||
.RS 4
|
||||
デフォルト記録のディスク・データの最大保持時間(分単位)を指定します。デフォルトでは、最大保持時間は15分に設定されています。
|
||||
.RE
|
||||
.PP
|
||||
maxsize=\fIsize\fR
|
||||
.RS 4
|
||||
スレッド・バッファからグローバル・バッファにフラッシュされるまでの、記録の最大サイズ(MB単位)を指定します。デフォルトでは、最大サイズは制限されていません。
|
||||
.sp
|
||||
このパラメータは、サイズが制限された記録の場合のみ有効です。
|
||||
.RE
|
||||
.PP
|
||||
settings=\fIpath\fR
|
||||
.RS 4
|
||||
イベント設定ファイル(タイプはJFS)のパスと名前を指定します。デフォルトでは、\fIJAVA_HOME/jre/lib/jfr\fRにある\fIdefault\&.jfs\fRファイルが使用されます。
|
||||
.RE
|
||||
.sp
|
||||
カンマで区切って、複数のパラメータの値を指定できます。たとえば、記録を現在の作業ディレクトリのtest\&.jfrに保存し、ログ・ファイルを圧縮するようJFRに指示するには、次のように指定します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-XX:StartFlightRecording=filename=test\&.jfr,compress=true
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XX:TLABSize=\fIn\fR
|
||||
.RS 4
|
||||
スレッド・ローカル割当てバッファ(TLAB)がJava HotSpot VMでデフォルトで有効になっています。Java HotSpot VMでは、TLABのサイズを割当てパターンに基づいて決定します。\fI\-XX:TLABSize\fRオプションでTLABのサイズを微調整できます。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+UnlockCommercialFeatures
|
||||
.RS 4
|
||||
このフラグは、商用機能の使用を能動的にロック解除する場合に使用します。商用機能とは、「Java SE Products」Webページで規定されているとおり、Oracle Java SE Advanced製品またはOracle Java SE Suite製品です。
|
||||
.sp
|
||||
このフラグが指定されていない場合、デフォルトはJava仮想マシンを使用可能な商用機能なしで実行することです。それらを有効にした後、実行時にそれらの使用を無効にすることはできません。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+UseAltSigs
|
||||
.RS 4
|
||||
Java VMではデフォルトで\fISIGUSR1\fRおよび\fISIGUSR2\fRを使用しますが、\fISIGUSR1\fRおよび\fISIGUSR2\fRをシグナル連鎖するアプリケーションと競合する場合があります。\fI\-XX:+UseAltSigs\fRオプションを指定すると、Java VMはデフォルトとして\fISIGUSR1\fRと\fISIGUSR2\fR以外のシグナルを使用します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+|\-UseCompressedOops
|
||||
.RS 4
|
||||
64ビットJava VMで圧縮された参照を有効にします。
|
||||
.sp
|
||||
このオプションは、デフォルトでtrueになります。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+UseConcMarkSweepGCまたは\-XX:+UseG1GC
|
||||
.RS 4
|
||||
Concurrent Mark Sweep (CMS)またはG1ガベージ・コレクションを有効にします。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+|\-UseLargePages
|
||||
.RS 4
|
||||
ラージ・ページ・サポートを有効にします。
|
||||
.sp
|
||||
ラージ・ページは、Solarisではデフォルトで有効になっています。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+UseParallelOldGC
|
||||
.RS 4
|
||||
パラレル・ガベージ・コレクタを有効にします。これはスループットおよび平均レスポンス時間に対して最適化されます。
|
||||
.RE
|
||||
.SH "注意"
|
||||
.PP
|
||||
\fI\-version:release\fRオプションでは、リリース指定の複雑さに制限はありません。ただし、可能なリリース指定の限られたサブセットのみが適切なサウンド・ポリシーを表現でき、それらのみが完全にサポートされます。それらのポリシーを次に示します。
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04' 1.\h'+01'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP " 1." 4.2
|
||||
.\}
|
||||
任意のバージョン。これは、このオプションを使用しないことで表現できます。
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04' 2.\h'+01'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP " 2." 4.2
|
||||
.\}
|
||||
次の例のように、ある特定の\fIバージョンID\fR値よりも大きい任意のバージョン。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
"1\&.6\&.0_10+"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
この場合、1\&.6\&.0_10よりも大きい任意のバージョンが使用されます。これは、指定されたバージョンで特定のインタフェースが導入された(あるいはそのバグが修正された)場合に便利です。
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04' 3.\h'+01'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP " 3." 4.2
|
||||
.\}
|
||||
次の例のように、ある特定のバージョンIDよりも大きいバージョンで、そのリリース・ファミリの上限によって制限されるもの。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
"1\&.6\&.0_10+ & 1\&.6*"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04' 4.\h'+01'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP " 4." 4.2
|
||||
.\}
|
||||
次の例のように、項目2または3の\fIor\fR式。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
"1\&.6\&.0_10+ & 1\&.6* 1\&.7+"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
項目2と同様です。これは、ある変更が特定のリリース(1\&.7)で導入されたが、その同じ変更が以前のリリースのアップデートでも利用可能になった、という場合に便利です。
|
||||
.RE
|
||||
.SH "パフォーマンス・チューニングの例"
|
||||
.PP
|
||||
スループットまたはレスポンス時間の高速化のどちらかを最適化するための、試験的なチューニング・フラグの使用例を次に示します。
|
||||
.PP
|
||||
\fBExample 1\fR, スループットを向上するためのチューニング
|
||||
.RS 4
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-d64 \-server \-XX:+AggressiveOpts \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\fBExample 2\fR, レスポンス時間を速くするためのチューニング
|
||||
.RS 4
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamps
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.SH "終了ステータス"
|
||||
.PP
|
||||
一般に、次の終了値が起動ツールから返されるのは通常、起動元が不正な引数で呼び出されたか、深刻なエラーが発生したか、あるいはJava仮想マシンから例外がスローされた場合です。ただしJavaアプリケーションは、API呼出し\fISystem\&.exit(exitValue)\fRを使用して任意の値を返すことを選択することもできます。
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fI0\fR: 正常終了
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fI>0\fR: エラー発生
|
||||
.RE
|
||||
.SH "関連項目"
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
javac [SolarisおよびLinux] [Windows]
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
jdb [SolarisおよびLinux] [Windows]
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
javah [SolarisおよびLinux] [Windows]
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
jar [SolarisおよびLinux] [Windows]
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
@@ -0,0 +1,203 @@
|
||||
." Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH javaws 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
\f2javaws\fPコマンドライン
|
||||
.LP
|
||||
.SH "名前"
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws\fP \- Java Web Start起動コマンド
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws [run\-options] <jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws [control\-options]\fP
|
||||
.LP
|
||||
.SH "パラメータ"
|
||||
.LP
|
||||
.LP
|
||||
\f2[run\-options]\fP
|
||||
.LP
|
||||
.LP
|
||||
コマンドライン実行オプション。実行オプションは任意の順序で指定できます。各種実行オプションの詳細は、次の実行オプションを参照してください。
|
||||
.LP
|
||||
.LP
|
||||
\f2<jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
JNLP(Java Network Launching Protocol)ファイルのパスまたはURL(Uniform Resource Locator)のどちらかを指定できます。
|
||||
.LP
|
||||
.LP
|
||||
\f2[control\-options]\fP
|
||||
.LP
|
||||
.LP
|
||||
コマンドライン制御オプション。制御オプションは任意の順序で指定できます。各種制御オプションの詳細は、次の制御オプションを参照してください。
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws\fPコマンドは、JNLP(Java Network Launching Protocol)のリファレンス実装であるJava Web Startを起動します。Java Web Startは、ネットワーク上で動作するJavaアプリケーションまたはアプレットを起動します。
|
||||
.LP
|
||||
.LP
|
||||
JNLPファイルが指定された場合、\f2javaws\fPは、そのJNLPファイルで指定されたJavaアプリケーション/アプレットを起動します。
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws\fP起動ツールには、現在のリリースでサポートされている1組のオプションがあります。ただし、これらのオプションは将来のリリースでは削除される可能性があります。
|
||||
.LP
|
||||
.SH "実行オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f2\-offline\fP
|
||||
.LP
|
||||
.LP
|
||||
Java Web Startをオフライン・モードで実行します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-Xnosplash\fP
|
||||
.LP
|
||||
.LP
|
||||
初期スプラッシュ画面を表示しません。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-open <arguments>\fP
|
||||
.LP
|
||||
.LP
|
||||
このオプションを指定すると、JNLPファイル内の引数が\f2\-open<arguments>\fPに置き換わります。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-print <arguments>\fP
|
||||
.LP
|
||||
.LP
|
||||
このオプションを指定すると、JNLPファイル内の引数が\f2\-print<arguments>\fPに置き換わります。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-online\fP
|
||||
.LP
|
||||
.LP
|
||||
オンライン・モードを使用します(デフォルトの動作)。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-wait\fP
|
||||
.LP
|
||||
.LP
|
||||
このオプションを指定した場合、\f2javaws\fPプロセスは、アプリケーションが終了するまで終了しません。Windowsプラットフォーム上では、このオプションは説明したとおりに機能しません。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
追加の出力を表示します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-J<option>\fP
|
||||
.LP
|
||||
.LP
|
||||
VMに対するオプションを指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-system\fP
|
||||
.LP
|
||||
.LP
|
||||
アプリケーションをシステム・キャッシュのみから実行します。
|
||||
.LP
|
||||
.SH "制御オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f2\-viewer\fP
|
||||
.LP
|
||||
.LP
|
||||
Javaコントロール・パネルでキャッシュ・ビューアを表示します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-clearcache\fP
|
||||
.LP
|
||||
.LP
|
||||
インストールされていないすべてのアプリケーションをキャッシュから削除します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-userConfig <property name>\fP
|
||||
.LP
|
||||
.LP
|
||||
指定されたデプロイメント・プロパティをクリアします。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-userConfig <property name> <property value>\fP
|
||||
.LP
|
||||
.LP
|
||||
指定されたデプロイメント・プロパティを指定された値に設定します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-uninstall\fP
|
||||
.LP
|
||||
.LP
|
||||
キャッシュからすべてのアプリケーションを削除します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-uninstall <jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
キャッシュからアプリケーションを削除します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-import [import\-options] <jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
キャッシュにアプリケーションをインポートします。
|
||||
.LP
|
||||
.SH "インポート・オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f2\-silent\fP
|
||||
.LP
|
||||
.LP
|
||||
サイレント・モードでインポートします(ユーザー・インタフェースは表示されません)。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-system\fP
|
||||
.LP
|
||||
.LP
|
||||
システム・キャッシュにアプリケーションをインポートします。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-codebase <url>\fP
|
||||
.LP
|
||||
.LP
|
||||
指定したcodebaseからリソースを取得します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-shortcut\fP
|
||||
.LP
|
||||
.LP
|
||||
ユーザーがプロンプトで許可した場合のようにショートカットをインストールします。このオプションは、\f2\-silent\fPオプションも使用しないと効果がありません。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-association\fP
|
||||
.LP
|
||||
.LP
|
||||
ユーザーがプロンプトで許可した場合のようにアソシエーションをインストールします。このオプションは、\f2\-silent\fPオプションも使用しないと効果がありません。
|
||||
.LP
|
||||
.SH "ファイル"
|
||||
.LP
|
||||
.LP
|
||||
ユーザー・キャッシュ、システム・キャッシュおよびdeployment.propertiesファイルについては、
|
||||
.na
|
||||
\f2システム・レベルおよびユーザー・レベルのプロパティ\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/properties.htmlを参照してください。
|
||||
.LP
|
||||
.SH "詳細情報"
|
||||
.LP
|
||||
.LP
|
||||
Java Web Startの詳細は、
|
||||
.na
|
||||
\f2Java Web Start\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/index.htmlを参照してください。
|
||||
.LP
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,349 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH orbd 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
orbd \- The Object Request Broker Daemon
|
||||
.LP
|
||||
.LP
|
||||
\f3orbd\fPは、CORBA環境のサーバーにある永続オブジェクトをクライアントから透過的に検索して呼び出せるようにするために使用します。
|
||||
.LP
|
||||
.LP
|
||||
\f3関連項目:\fP
|
||||
.na
|
||||
\f2ネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd <\fP\f3options\fP\f3>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f3orbd\fPツールに含まれるサーバー・マネージャを使用すると、クライアントはCORBA環境でサーバー上にある永続オブジェクトを透過的に検索して呼び出すことができます。永続サーバーは、ネーム・サービスに永続オブジェクト参照を発行する際、サーバーのポート番号のかわりにORBDのポート番号をオブジェクト参照に含めます。永続オブジェクト参照のオブジェクト参照にORBDポート番号を含めることには、次のような利点があります。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
ネーム・サービスにあるオブジェクト参照が、サーバーのライフ・サイクルと無関係になります。たとえば、オブジェクト参照は、初めてインストールされたときはネーム・サービスのサーバーによってネーム・サービスに発行されますが、その後は、サーバーの開始またはシャットダウンの回数にかかわらず、呼び出したクライアントにORBDがいつでも正しいオブジェクト参照を返します。
|
||||
.TP 2
|
||||
o
|
||||
クライアントは一度のみネーミング・サービスのオブジェクト参照をルックアップする必要がありますが、その後はサーバーのライフ・サイクルによる変更とは無関係にこの参照を利用することができます。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
ORBDのサーバー・マネージャにアクセスするには、servertool(1)を使用してサーバーを起動する必要があります。servertoolは、アプリケーション・プログラマが、永続サーバーの登録、登録解除、起動およびシャットダウンを行うためのコマンドライン・インタフェースです。サーバー・マネージャの詳細は、このドキュメントの\f2サーバー・マネージャ\fPという項を参照してください。
|
||||
.LP
|
||||
.LP
|
||||
\f2orbd\fPを起動すると、ネーム・サービスも起動されます。ネーム・サービスの詳細は、
|
||||
.na
|
||||
\f2ネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.htmlを参照してください。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.SS
|
||||
必須オプション
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-ORBInitialPort nameserverport
|
||||
ネーム・サーバーを起動するポートの番号を指定します。\f2orbd\fPは、起動されると、このポート上で着信リクエストを待機します。Solarisソフトウェアを使用する場合、1024より小さいポート上でプロセスを開始するには、rootユーザーになる必要があります。このため、1024以上のポート番号を使用することをお薦めします。(必須)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.SS
|
||||
その他のオプション
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-port port
|
||||
ORBDを起動するポートを指定します。このポートで、永続オブジェクトに対するリクエストをORBDが受け取ります。このポートのデフォルト値は1049です。このポート番号は、永続Interoperable Object References(IOR)のポート・フィールドに追加されます。(省略可)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-defaultdb directory
|
||||
ORBD永続格納ディレクトリ\f2orb.db\fPが作成されるベース・ディレクトリを指定します。このオプションが指定されていない場合、デフォルト値は「./orb.db」になります。(省略可)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverPollingTime milliseconds
|
||||
\f2servertool\fPを使用して登録された永続サーバーが正常に動作していることをORBDが確認する回数を指定します。デフォルト値は1,000ミリ秒です。\f2milliseconds\fPに指定する値は、有効な正の整数にする必要があります。(省略可)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverStartupDelay milliseconds
|
||||
\f2servertool\fPを使用して登録された永続サーバーを再起動してから、位置転送の例外を送信するまでのORBDの待機時間を指定します。デフォルト値は1,000ミリ秒です。\f2milliseconds\fPに指定する値は、有効な正の整数にする必要があります。(省略可)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Joption
|
||||
Java仮想マシンに\f2option\fPを渡します。\f2option\fPには、java(1)のリファレンス・ページに記載されているオプションを1つ指定します。たとえば、\f3\-J\-Xms48m\fPと指定すると、スタートアップ・メモリーは48Mバイトに設定されます。\f3\-J\fPを使用して背後の仮想マシンにオプションを渡すことはよく行われています。
|
||||
.TP 3
|
||||
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "ネーム・サービスの起動と停止"
|
||||
.LP
|
||||
.LP
|
||||
ネーム・サービスは、
|
||||
.na
|
||||
\f2CORBAオブジェクト\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20objectにネーミングを可能にするCORBAサービスです。ネーミングは名前をオブジェクト参照にバインドすることにより可能になります。
|
||||
.na
|
||||
\f2ネーム・バインディング\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#name%20bindingをネーム・サービスに格納すれば、クライアントが名前を指定して目的のオブジェクト参照を取得できるようになります。
|
||||
.LP
|
||||
.LP
|
||||
ORBDは、クライアントまたはサーバーを実行する前に起動します。ORBDには、永続ネーム・サービスおよび一時ネーム・サービスが組み込まれています。これらはどちらもCOSネーム・サービスの実装です。
|
||||
.LP
|
||||
.LP
|
||||
\f4永続\fP\f3ネーム・サービス\fPは、ネーミング・コンテキストに対して永続性を提供します。つまり、この情報は、サービスの停止や起動後にも維持され、サービスに障害が発生した場合でも回復できます。ORBDを再起動すると、永続ネーム・サービスはネーミング・コンテキストのグラフを復元し、すべてのクライアントとサーバーの名前のバインディングがそのまま(永続的に)保持されるようにします。
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
下位互換性のため、旧バージョンのJDKに同梱されていた\f4一時\fP\f3ネーム・サービス\fP\f2tnameserv\fPが、今回のリリースのJ2SEにも同梱されています。一時ネーム・サービスでは、ネーム・サービスの実行中にのみネーミング・コンテキストが保持されます。サービスが中断されると、ネーミング・コンテキスト・グラフは失われます。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-ORBInitialPort\fP引数は、\f2orbd\fPの必須のコマンドライン引数で、ネーム・サービスが実行されるポートの番号を設定するために使用されます。次の手順では、Java\ IDL Object Request Broker Daemon用にポート1050を使用できることを前提としています。Solarisソフトウェアを使用する場合、1024より小さいポート上でプロセスを開始するには、rootユーザーになる必要があります。このため、1024以上のポート番号を使用することをお薦めします。必要であれば別のポートに変更してください。
|
||||
.LP
|
||||
.LP
|
||||
UNIXコマンド・シェルで\f2orbd\fPを起動するには、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
WindowsのMS\-DOSシステム・プロンプトでは、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
これでORBDが実行され、サーバーとクライアントのアプリケーションを実行できるようになります。クライアントとサーバーのアプリケーションは、実行時に、ネーム・サービスが実行されているポートの番号(必要な場合はさらにマシン名)を認識している必要があります。これを実現する1つの方法は、次のコードをアプリケーションに追加することです。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
この例では、ネーム・サービスは、ホストMyHostのポート1050上で実行されます。別の方法として、コマンドラインからサーバーまたはクライアントのアプリケーションを実行するときに、ポート番号またはマシン名あるいはその両方を指定する方法もあります。たとえば、次のコマンドライン・オプションを使用して、「HelloApplication」を起動できます。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
ネーム・サービスを停止するには、適切なオペレーティング・システム・コマンドを使用します。たとえば、Solaris上で\f2pkill orbd\fPを実行したり、\f2orbd\fPが動作中のDOSウィンドウで\f2[Ctrl]+[C]\fPキーを押します。一時ネーム・サービスの場合は、サービスが終了されると、ネーム・サービスに登録された名前が消去される場合があります。Java IDLネーム・サービスは、明示的に停止されるまで実行されます。
|
||||
.LP
|
||||
.LP
|
||||
ORBDに含まれるネーム・サービスの詳細は、
|
||||
.na
|
||||
\f2ネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.htmlを参照してください。
|
||||
.LP
|
||||
.SH "サーバー・マネージャ"
|
||||
.LP
|
||||
.LP
|
||||
ORBDのサーバー・マネージャにアクセスして、永続サーバーを実行するには、servertool(1)を使用してサーバーを起動する必要があります。servertoolは、アプリケーション・プログラマが、永続サーバーの登録、登録解除、起動およびシャットダウンを行うためのコマンドライン・インタフェースです。\f2servertool\fPを使用してサーバーを起動する場合は、\f2orbd\fPが実行されている場所と同じポートとホストで起動する必要があります。サーバーを異なるポートで実行すると、ローカル・コンテキスト用にデータベースに保存されている情報が無効になり、サービスが正しく動作しません。
|
||||
.LP
|
||||
.SS
|
||||
サーバー・マネージャ: 例
|
||||
.LP
|
||||
.LP
|
||||
デモ用の
|
||||
.na
|
||||
\f2サンプル・チュートリアル\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlExample.htmlを使用し、チュートリアルの手順に従って、\f2idlj\fPコンパイラと\f2javac\fPコンパイラを実行します。サーバー・マネージャを実行するには、次の手順に従ってアプリケーションを実行します。
|
||||
.LP
|
||||
.LP
|
||||
\f2orbd\fPを起動します。
|
||||
.LP
|
||||
.LP
|
||||
UNIXコマンド・シェルで\f2orbd\fPを起動するには、次のように入力します。
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
WindowsのMS\-DOSシステム・プロンプトでは、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f21050\fPはネーム・サーバーを実行するポートです。\f2\-ORBInitialPort\fPは必要なコマンドラインの引数です。Solarisソフトウェアを使用する場合、1024より小さいポート上でプロセスを開始するには、rootユーザーになる必要があります。このため、1024以上のポート番号を使用することをお薦めします。
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPを起動します。
|
||||
.LP
|
||||
.LP
|
||||
Helloサーバーを起動するには、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
前回の手順とネーム・サーバー(\f2orbd\fP)のポートが同じであることを確認します。たとえば\f2\-ORBInitialPort 1050\fPのようになります。\f2servertool\fPは、ネーム・サーバーと同じポート上で起動する必要があります。
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPコマンドライン・インタフェースが表示されます。
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPプロンプトからHelloサーバーを起動します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool > register \-server HelloServer \-classpath . \-applicationName
|
||||
.fl
|
||||
HelloServerApName
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPによってサーバーが登録されて、「HelloServerApName」という名前がサーバーに割り当てられ、登録されているすべてのサーバー一覧とともにサーバーIDが表示されます。
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
別の端末ウィンドウまたはプロンプトからクライアント・アプリケーションを実行します。
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
この例の\f2\-ORBInitialHost localhost\fPは省略することができます。ネーム・サーバーがHelloクライアントとして同一ホスト上で動作しているからです。ネーム・サーバーが別のホストで動作している場合は、IDLネーム・サーバーが動作しているホストを\f2\-ORBInitialHost\fP \f2nameserverhost\fPで指定します。
|
||||
.LP
|
||||
.LP
|
||||
前回の手順と同様にネーム・サーバー(\f2orbd\fP)のポートを指定します。たとえば\f2\-ORBInitialPort 1050\fPのようになります。
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
サーバー・マネージャの操作が終了したら、ネーム・サーバー(\f2orbd\fP)と\f2servertool\fPを停止するか終了してください。
|
||||
.LP
|
||||
.LP
|
||||
DOSプロンプトで\f2orbd\fPをシャットダウンするには、サーバーを実行しているウィンドウを選択して\f2[Ctrl]+[C]\fPキーを押します。UNIXシェルで\f2orbd\fPをシャットダウンするには、プロセスを検出して終了(kill)します。サーバーを明示的に停止するまでは、呼出し待機状態が続きます。
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPをシャットダウンするには、\f2quit\fPと入力してキーボードの\f2[Enter]\fPキーを押します。
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2ネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
.br
|
||||
.TP 2
|
||||
o
|
||||
servertool(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.br
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH pack200 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
pack200 \- JARパック・ツール
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
形式
|
||||
.TP 2
|
||||
o
|
||||
説明
|
||||
.TP 2
|
||||
o
|
||||
オプション
|
||||
.TP 2
|
||||
o
|
||||
終了ステータス
|
||||
.TP 2
|
||||
o
|
||||
関連項目
|
||||
.TP 2
|
||||
o
|
||||
注意
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.LP
|
||||
\f4pack200\fP\f2 [ \fP\f2options\fP ] \f2output\-file\fP \f2JAR\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
オプションの指定順序に決まりはありません。コマンドラインまたはpropertiesファイルに指定された最後のオプションが、それ以前に指定されたすべてのオプションより優先されます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
コマンドライン・オプション。
|
||||
.TP 3
|
||||
output\-file
|
||||
出力ファイルの名前。
|
||||
.TP 3
|
||||
JAR\-file
|
||||
入力ファイルの名前。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f2pack200\fPツールは、Java \f2gzip\fP圧縮プログラムを使用してJARファイルを\f2pack200\fP圧縮ファイルに変換するJavaアプリケーションです。\f2pack200\fPファイルは高圧縮のファイルで、帯域幅の節約やダウンロード時間の短縮や直接デプロイすることができます。
|
||||
.LP
|
||||
.LP
|
||||
\f2pack200\fPツールには、圧縮エンジンの設定や微調整を行うオプションが用意されています。
|
||||
.LP
|
||||
.SS
|
||||
一般的な使用方法:
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 myarchive.pack.gz myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
この例では、デフォルトの\f2pack200\fP設定を使用して\f2myarchive.pack.gz\fPが生成されます。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f4\-r \-\-repack\fP
|
||||
.LP
|
||||
.LP
|
||||
ファイル\f2myarchive.jar\fPをパックした後アンパックすることで、JARファイルを生成します。生成されたファイルは\f2jarsigner(1)\fPツールの入力ファイルとして使用できます。
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive\-packer.jar myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-g \-\-no\-gzip\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2pack200\fPファイルを生成します。このオプションを指定するときは、適切な圧縮ツールを使用する必要があります。また、ターゲット・システムでは、対応する圧縮解除ツールを使用する必要があります。
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-no\-gzip myarchive.pack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-G \-\-strip\-debug\fP
|
||||
.LP
|
||||
.LP
|
||||
出力からデバッグ用の属性を削除します。これには、\f2SourceFile\fP、\f2LineNumberTable\fP、\f2LocalVariableTable\fP、\f2LocalVariableTypeTable\fPが含まれます。これらの属性を削除すれば、ダウンロードとインストールのサイズは小さくなりますが、デバッガの機能は制限されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
入力ファイル内のファイルの順序を維持します。これがデフォルトの動作です。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-O \-\-no\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
パック・ツールは、すべての要素を並べ替えて転送します。さらに、JARディレクトリ名が削除される場合があります。このため、ダウンロードのサイズは小さくなりますが、インデックスをはじめとするJARファイルの最適化機能は正常に動作しなくなることがあります。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Svalue \-\-segment\-limit=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
この値は、各アーカイブ・セグメントの予想ターゲット・サイズN(バイト単位)です。単一の入力ファイルの必要サイズが
|
||||
.br
|
||||
Nバイトを超えると、そのファイルには独立したアーカイブ・セグメントが割り当てられます。特殊なケースとして、値が\f2\-1\fPの場合は、すべての入力ファイルを含む大きな単一のセグメントが生成され、値が\f20\fPの場合は、クラスごとにセグメントが1つずつ生成されます。アーカイブ・セグメントが大きくなると、断片化が少なくなり圧縮率が高くなりますが、その処理には多くのメモリーが必要です。
|
||||
.LP
|
||||
.LP
|
||||
各セグメントのサイズは、セグメントに変換されるそれぞれの入力ファイルのサイズのほか、その名前と他の送信されるプロパティのサイズを計算して推測されます。
|
||||
.LP
|
||||
.LP
|
||||
デフォルトは \-1です。つまり、パック・ツールは常に単一のセグメント出力ファイルを作成します。極端に大きな出力ファイルが生成される場合には、入力ファイルをセグメント化(分割)してより小さなJARにすることを強くお薦めします。
|
||||
.LP
|
||||
.LP
|
||||
この制限が課されていない10MBのJARパック・ファイルは通常、約10%小さくパックされます。しかし、パック・ツールでより大きなJavaヒープ(セグメントの制限の約10倍)を必要とする場合もあります。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Evalue \-\-effort=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
単一の10進数値を指定した場合、パック・ツールは、指定された圧縮率でアーカイブを圧縮します。レベル\f21\fPの場合は、比較的短い圧縮時間でやや大きめのファイルが生成されますが、レベル\f29\fPの場合は、非常に長い時間がかかるものの、より圧縮率の高いファイルが生成されます。特殊な値\f20\fPを指定した場合は、元のJARファイルを圧縮なしで直接コピーします。JSR 200標準では、すべての解凍プログラムが、この特別な場合をアーカイブ全体のパススルーと解釈するように規定しています。
|
||||
.LP
|
||||
.LP
|
||||
デフォルトは\f25\fPです。この場合、標準的な時間で適切な圧縮が行われます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
入力情報を保存するというデフォルト値を上書きします。転送されるアーカイブのサイズは大きくなる場合があります。次の値を指定できます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
true
|
||||
.TP 3
|
||||
false
|
||||
どちらの場合でも、指定に従ってパック・ツールがデフレーション・ヒントを出力アーカイブに設定します。アーカイブ要素の個々のデフレーション・ヒントは転送されません。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
keep
|
||||
入力JAR.内で見つかったデフレーション・ヒントを維持します。(これがデフォルトです。)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-mvalue \-\-modification\-time=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
次の値を指定できます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
latest
|
||||
パック・ツールは、元のアーカイブの使用可能なすべてのエントリのうちの最終更新時刻か、そのセグメントの使用可能なすべてのエントリの最終更新時刻を特定しようとします。この単一の値はセグメントの一部として転送され、各セグメントの全エントリに適用されます。この場合、すべてのインストール・ファイルに単一の日付が設定されるという問題はありますが、アーカイブの転送サイズを少し小さくすることができます。
|
||||
.TP 3
|
||||
keep
|
||||
入力JAR内で見つかった変更時刻を維持します。(これがデフォルトです。)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Pfile \-\-pass\-file=\fP\f2file\fP
|
||||
.LP
|
||||
.LP
|
||||
ファイルを圧縮せず、バイト単位で転送するように指定します。このオプションを繰返し使用して、複数のファイルを指定できます。システム・ファイル・セパレータがJARファイルセパレータ「\f2/\fP」に置き換えられる点を除き、パス名の変換は行われません。結果として得られるファイル名は、文字列として正確にJARファイルでの出現と一致している必要があります。fileにディレクトリ名を指定した場合、そのディレクトリ内のすべてのファイルが転送されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Uaction \-\-unknown\-attribute=\fP\f2action\fP
|
||||
.LP
|
||||
.LP
|
||||
デフォルトの動作を無効にします。たとえば、不明な属性を含むクラス・ファイルを指定したアクションで転送します。アクションとして指定可能な値は次のとおりです。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
error
|
||||
\f2pack200\fPの操作全体に失敗し、適切な解説が表示されます。
|
||||
.TP 3
|
||||
strip
|
||||
属性がドロップされます。注意: VM必須属性を削除するとクラス・ローダーの障害が発生することがあります。
|
||||
.TP 3
|
||||
pass
|
||||
この属性が検出された場合、クラス全体が1つのリソースとして転送されます。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Cattribute\-name=\fP\f2layout\fP \f3\-\-class\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Fattribute\-name=\fP\f2layout\fP \f3\-\-field\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Mattribute\-name=\fP\f2layout\fP \f3\-\-method\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Dattribute\-name=\fP\f2layout\fP \f3\-\-code\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.LP
|
||||
.LP
|
||||
これら4つのオプションでは、クラス・エンティティにClass属性、Field属性、Method属性、Code属性などの属性のレイアウトを指定できます。attribute\-nameには、これからレイアウトまたはアクションを定義する属性の名前を指定します。アクションとして指定可能な値は次のとおりです。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
some\-layout\-string
|
||||
レイアウト言語は、JSR 200仕様に定義されています。
|
||||
.LP
|
||||
例: \f2\-\-class\-attribute=SourceFile=RUH\fP
|
||||
.TP 3
|
||||
error
|
||||
この属性が検出された場合、pack200の操作に失敗し、適切な解説が表示されます。
|
||||
.TP 3
|
||||
strip
|
||||
この属性が検出された場合、属性は出力から削除されます。注意: VM必須属性を削除するとクラス・ローダーの障害が発生することがあります。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
例: \f2\-\-class\-attribute=CompilationID=pass\fPというこの属性を含むクラス・ファイルを転送します。パック・ツールは、その他のアクションを行いません。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-f\fP\f2 \fP\f2pack.properties\fP \f3\-\-config\-file=\fP\f2pack.properties\fP
|
||||
.LP
|
||||
.LP
|
||||
コマンドラインに、パック・ツールを初期化するためのJavaプロパティが含まれている構成ファイルを指定できます。
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-f pack.properties myarchive.pack.gz myarchive.jar\fP
|
||||
.br
|
||||
\f2% more pack.properties\fP
|
||||
.br
|
||||
\f2# Generic properties for the packer.\fP
|
||||
.br
|
||||
\f2modification.time=latest\fP
|
||||
.br
|
||||
\f2deflate.hint=false\fP
|
||||
.br
|
||||
\f2keep.file.order=false\fP
|
||||
.br
|
||||
\f2# This option will cause the files bearing new attributes to\fP
|
||||
.br
|
||||
\f2# be reported as an error rather than passed uncompressed.\fP
|
||||
.br
|
||||
\f2unknown.attribute=error\fP
|
||||
.br
|
||||
\f2# Change the segment limit to be unlimited.\fP
|
||||
.br
|
||||
\f2segment.limit=\-1\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-v \-\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
最小限のメッセージを出力します。このオプションを複数指定すると、より長いメッセージが出力されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-q \-\-quiet\fP
|
||||
.LP
|
||||
.LP
|
||||
メッセージを表示せずに動作するように指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
|
||||
.LP
|
||||
.LP
|
||||
出力メッセージのログ・ファイルを指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-? \-h \-\-help\fP
|
||||
.LP
|
||||
.LP
|
||||
このコマンドに関するヘルプ情報を出力します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-V \-\-version\fP
|
||||
.LP
|
||||
.LP
|
||||
このコマンドに関するバージョン情報を出力します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-J\fP\f2option\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2option\fPを、\f2pack200\fPから呼び出されたJava起動ツールに渡します。たとえば、\f2\-J\-Xms48m\fPと指定すると、スタートアップ・メモリーが48Mバイトに設定されます。このオプションは\f2\-X\fPで始まっていませんが、\f2pack200\fPの標準オプションではありません。\f2\-J\fPを使用して、Javaで記述されたアプリケーションを実行する背後のVMにオプション渡すことは、よく行われています。
|
||||
.LP
|
||||
.SH "終了ステータス"
|
||||
.LP
|
||||
.LP
|
||||
次の終了値が返されます。
|
||||
.LP
|
||||
.LP
|
||||
\f2\ 0\fP正常終了した場合
|
||||
.LP
|
||||
.LP
|
||||
\f2>0\fPエラーが発生した場合
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
unpack200(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java SEのドキュメント\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/index.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Javaデプロイメント・ガイド \- Pack200\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
|
||||
.TP 2
|
||||
o
|
||||
jar(1) \- Java Archiveツール
|
||||
.TP 2
|
||||
o
|
||||
jarsigner(1) \- JAR署名ツール
|
||||
.TP 2
|
||||
o
|
||||
\f2attributes(5)\fPのマニュアル・ページ
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "注意"
|
||||
.LP
|
||||
.LP
|
||||
このコマンドと\f2pack(1)\fPを混同しないでください。これらは別製品です。
|
||||
.LP
|
||||
.LP
|
||||
JDKに付属するJava SE API仕様との相違が見つかった場合には、仕様を優先してください。
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH policytool 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
policytool \- PolicyTool管理GUIユーティリティ
|
||||
.LP
|
||||
\f3policytool\fPは、ユーティリティGUI経由で取得したユーザー入力に基づいて、プレーン・テキストのポリシー・ファイルを読み書きします。
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
形式
|
||||
.TP 2
|
||||
o
|
||||
説明
|
||||
.TP 2
|
||||
o
|
||||
オプション
|
||||
.TP 2
|
||||
o
|
||||
関連項目
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.LP
|
||||
policytool管理者ユーティリティを実行します
|
||||
.LP
|
||||
.LP
|
||||
\f4policytool\fP
|
||||
.LP
|
||||
.LP
|
||||
policytoolを実行し、指定されたポリシー・ファイルを読み込みます
|
||||
.LP
|
||||
.LP
|
||||
\f4policytool\fP\f2[\-file\ \fP\f2filename\fP\f2]\fP
|
||||
.LP
|
||||
.LP
|
||||
説明
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
ローカル・ポリシー・ファイルを読み込むように\f2policytool\fPに指示します
|
||||
.TP 3
|
||||
filename
|
||||
ファイル名
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f3policytool\fPは、ユーザーがローカル・ポリシー・ファイルの内容を管理することを可能にするGUIです。詳細は、
|
||||
.na
|
||||
\f2ポリシー・ファイル作成および管理ツール\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.htmlを参照してください。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
\f2filename\fPを読み込みます。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.na
|
||||
\f2デフォルトのポリシー実装および構文\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
.na
|
||||
\f2ポリシー・ツール・ユーザーズ・ガイド\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
.na
|
||||
\f2セキュリティ権限\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/permissions.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
.na
|
||||
\f2セキュリティの概要\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/overview/jsoverview.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,309 @@
|
||||
." Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH rmid 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
rmid \- Java RMI起動システム・デーモン
|
||||
.LP
|
||||
.LP
|
||||
\f3rmid\fPでアクティブ化するシステム・デーモンを開始すると、オブジェクトを仮想マシン(VM)に登録してアクティブ化できるようになります。
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid [options]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f3rmid\fPツールは、起動システム・デーモンを開始します。アクティブ化システム・デーモンを開始してからでないと、アクティブ化可能オブジェクトをアクティブ化システムに登録したり、VM内でアクティブ化したりすることができません。起動可能なリモート・オブジェクトを使用したプログラムの作成方法の詳細は、
|
||||
.na
|
||||
\f2Java RMI仕様\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/platform/rmi/spec/rmiTOC.htmlおよび
|
||||
.na
|
||||
\f2起動のチュートリアル\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/activation/overview.htmlを参照してください。
|
||||
.LP
|
||||
.LP
|
||||
デーモンを起動するには、次のように、セキュリティ・ポリシー・ファイルを指定して\f2rmid\fPコマンドを実行します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3注意:\fP \f2rmid\fPのSunの実装を実行する場合、デフォルトでは、セキュリティ・ポリシー・ファイルを指定する必要があります。それは、\f2rmid\fPが起動グループ用にVMを起動するために各\f2ActivationGroupDesc\fP内の情報を使用できるかどうかを検証できるようにするためです。特に、\f2ActivationGroupDesc\fPのコンストラクタに渡される\f2CommandEnvironment\fPや任意の\f2Properties\fPによって指定されるコマンドおよびオプションは、\f2rmid\fPのセキュリティ・ポリシー・ファイルの中で明示的に許可することが必要になりました。\f2sun.rmi.activation.execPolicy\fPプロパティの値は、起動グループ用にVMを起動するために\f2ActivationGroupDesc\fP内の情報を使用できるかどうかを判断するときに\f2rmid\fPが使用するポリシーを決定します。
|
||||
.LP
|
||||
.LP
|
||||
\f2rmid\fPをデフォルト設定で実行すると、次のような処理が行われます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
アクティベータを起動し、デフォルト・ポート1098で内部レジストリを起動する
|
||||
.TP 2
|
||||
o
|
||||
この内部レジストリの中で、\f2ActivationSystem\fPを\f2java.rmi.activation.ActivationSystemという名前に\fPバインドする
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
レジストリに他のポートを指定するには、\f2rmid\fPの起動時に\f2\-port\fPオプションを指定する必要があります。次に示します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy \-port 1099
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
このコマンドは、起動システム・デーモンを開始し、レジストリのデフォルト・ポート1099でレジストリを開始します。
|
||||
.LP
|
||||
.SS
|
||||
rmidをinetd/xinetdから開始する
|
||||
.LP
|
||||
.LP
|
||||
\f2rmid\fPをコマンドラインから開始するには、\f2inetd\fP(Solarisの場合)、または\f2xinetd\fP(Linuxの場合)を構成して\f2rmid\fPを必要に応じて開始する方法もあります。
|
||||
.LP
|
||||
.LP
|
||||
\f2rmid\fPを開始すると、\f2System.inheritedChannel\fPメソッドを呼び出して、継承されたチャンネル(\f2inetd\fP/\f2xinetd\fPから継承)を取得しようとします。継承されたチャンネルが\f2null\fPであるか、\f2java.nio.channels.ServerSocketChannel\fPのインスタンスでなかった場合、\f2rmid\fPはそのチャンネルは\f2inetd\fP/\f2xinetd\fPによって起動されたものではないと判断し、前述のように起動します。
|
||||
.LP
|
||||
.LP
|
||||
継承されたチャンネルが\f2ServerSocketChannel\fPインスタンスである場合は、\f2rmid\fPはエクスポートするリモート・オブジェクト、つまり\f2java.rmi.activation.ActivationSystem\fPがバインドされているレジストリと\f2java.rmi.activation.Activator\fPリモート・オブジェクトに対するリクエストを受信するサーバー・ソケットとして、\f2ServerSocketChannel\fPから取得した\f2java.net.ServerSocket\fPを使用します。このモードでは、\f2rmid\fPの動作は、\f2次のことを除いて\fP、コマンドラインから起動した場合と同じです。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f2System.err\fPに対する出力は、ファイルにリダイレクトされる。このファイルは\f2java.io.tmpdir\fPシステム・プロパティで指定されるディレクトリ(通常は\f2/var/tmp\fPまたは\f2/tmp\fP)にある。ファイル名の接頭辞は\f2"rmid\-err"\fPで、接尾辞は\f2"tmp"\fPである。
|
||||
.TP 2
|
||||
o
|
||||
\f2\-port\fPオプションは拒否される。このオプションを指定すると、\f2rmid\fPはエラー・メッセージを出して終了する。
|
||||
.TP 2
|
||||
o
|
||||
\f2\-log\fPオプションは必須。このオプションを指定しないと、\f2rmid\fPはエラー・メッセージを出して終了する。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
必要に応じてサービスを開始するように構成する方法の詳細は、\f2inetd\fP(Solarisの場合)、または\f2xinetd\fP(Linux)のマニュアル・ページを参照してください。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-C<someCommandLineOption>
|
||||
\f2rmid\fPの子プロセス(起動グループ)が作成されたときに、それぞれの子プロセスにコマンドライン引数として渡されるオプションを指定します。たとえば、次のように指定すると、起動システム・デーモンによって生成される各仮想マシンにプロパティを渡すことができます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Dsome.property=value
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
コマンドライン引数を子プロセスに渡す機能は、デバッグを行う場合に便利です。たとえば、次のようなコマンドを実行できます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Djava.rmi.server.logCalls=true
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
このコマンドにより、すべての子VMでサーバー呼出しのログが作成されるようになります。
|
||||
.LP
|
||||
.TP 3
|
||||
\-J<someCommandLineOption>
|
||||
\f2rmid\fPを実行している\f2java\fPインタプリタに渡すオプションを指定します。たとえば、\f2rmid\fPが\f2rmid.policy\fPという名前のポリシー・ファイルを使用するように指定するには、\f2rmid\fPのコマンドラインで\f2\-J\fPオプションを使用して、\f2java.security.policy\fPプロパティを定義します。次に例を示します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-J\-Dsun.rmi.activation.execPolicy=<policy>
|
||||
起動グループが実行されることになるVMの起動に使用するコマンドおよびコマンドライン・オプションをチェックするために、\f2rmid\fPが採用するポリシーを指定します。このオプションは、Java RMI起動デーモンのSunの実装のみに存在することに注意してください。コマンドラインにこのプロパティを指定しない場合、結果は\f2\-J\-Dsun.rmi.activation.execPolicy=default\fPを指定した場合と同じになります。\f2<policy>\fPに指定可能な値は、\f2default\fP、\f2<policyClassName>\fP、または\f2none\fPです。
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f3default(または、このプロパティが\fP\f4指定されていない\fP\f3場合)\fP
|
||||
.LP
|
||||
デフォルトの\f2execPolicy\fPの場合、\f2rmid\fPが実行できるのは、\f2rmid\fPが使用するセキュリティ・ポリシー・ファイルの中で、実行する権限が\f2rmid\fPに与えられているコマンドおよびコマンドライン・オプションのみです。\f2デフォルト\fPの実行ポリシーで使用できるのは、デフォルトの起動グループ実装のみです。
|
||||
.LP
|
||||
\f2rmid\fPは、起動グループ用のVMを起動するときに、そのグループについて登録された起動グループ記述子である\f2ActivationGroupDesc\fP内の情報を使用します。グループ記述子は、\f2ActivationGroupDesc.CommandEnvironment\fPを指定します(省略可能)。これには、起動グループを開始する\f2コマンド\fPと、そのコマンドラインに追加できるコマンドライン・\f2オプション\fPが含まれています。デフォルトでは、\f2rmid\fPは\f2java.home\fPにある\f2java\fPコマンドを使用します。グループ記述子には、オプションとしてコマンドラインに追加される\f2プロパティ\fP・オーバーライドも含まれています。このプロパティは、次のように定義します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-D\fP\f4<property>\fP\f3=\fP\f4<value>\fP\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.LP
|
||||
アクセス権\f2com.sun.rmi.rmid.ExecPermission\fPを使用すると、\f2rmid\fPに対して、グループ記述子の\f2CommandEnvironment\fPで指定されたコマンドを実行して起動グループを開始する権限を許可することができます。アクセス権\f2com.sun.rmi.rmid.ExecOptionPermission\fPを使用すると、グループ記述子でプロパティ・オーバーライドとして指定されたコマンドライン・オプション、または\f2CommandEnvironment\fPでオプションとして指定されたコマンドライン・オプションを、起動グループを開始するときに\f2rmid\fPが使用できるようになります。
|
||||
.LP
|
||||
\f2rmidに\fP様々なコマンドおよびオプションを実行する権限を許可する場合は、アクセス権\f2ExecPermission\fPおよび\f2ExecOptionPermission\fPを汎用的に許可する必要があります。つまり、すべてのコード・ソースに対して許可します。
|
||||
.RS 3
|
||||
.TP 3
|
||||
ExecPermission
|
||||
\f2ExecPermission\fPクラスは、起動グループを開始するために\f2rmidが\fP特定の\f2コマンド\fPを実行する権限を表します。
|
||||
.LP
|
||||
\f3構文\fP
|
||||
.br
|
||||
\f2ExecPermission\fPの\f2名前\fPは、\f2rmid\fPに実行を許可するコマンドのパス名です。「/*」(「/」はファイル区切り文字\f2File.separatorChar\fP)で終わるパス名は、そのディレクトリに含まれるすべてのファイルを示します。「/\-」で終わるパス名は、そのディレクトリに含まれるすべてのファイルとサブディレクトリ(再帰的に)を示します。パス名に特別なトークン「<<ALL FILES>>」を指定した場合は、\f3任意の\fPファイルを示します。
|
||||
.LP
|
||||
\f3注意:\fP 「*」を1つのみ指定したパス名は、現在のディレクトリ内のすべてのファイルを表します。また、「\-」を1つのみ指定したパス名は、現在のディレクトリ内のすべてのファイルと、現在のディレクトリに含まれるすべてのファイルとサブディレクトリ(再帰的に)を表します。
|
||||
.TP 3
|
||||
ExecOptionPermission
|
||||
\f2ExecOptionPermission\fPクラスは、起動グループを開始するときに\f2rmid\fPで特定のコマンドライン・\f2オプション\fPを使用できる権限を表します。\f2ExecOptionPermission\fPの\f2名前\fPは、コマンドライン・オプションの値です。
|
||||
.LP
|
||||
\f3構文\fP
|
||||
.br
|
||||
オプションでは、ワイルドカードが限定的にサポートされます。アスタリスクは、ワイルドカード・マッチを表します。アスタリスクは、オプション名そのものとして使用できます。つまり、任意のオプションを表すことができます。また、オプション名の末尾に使用することもできます。ただし、「.」か「=」の直後にアスタリスクを指定する必要があります。
|
||||
.LP
|
||||
例を示します。「*」、「\-Dfoo.*」、「\-Da.b.c=*」は有効ですが、「*foo」、「\-Da*b」、「ab*」は無効です。
|
||||
.TP 3
|
||||
rmidのポリシー・ファイル
|
||||
\f2rmidに\fP様々なコマンドおよびオプションを実行する権限を許可する場合は、アクセス権\f2ExecPermission\fPおよび\f2ExecOptionPermission\fPを汎用的に許可する必要があります。つまり、すべてのコード・ソースに対して許可します。これらのアクセス権をチェックするのは\f2rmid\fPのみなので、これらのアクセス権を汎用的に許可しても安全です。
|
||||
.LP
|
||||
\f2rmid\fPに各種の実行権限を許可するポリシー・ファイルの例を、次に示します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
grant {
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/java/jdk1.7.0/solaris/bin/java";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/rmidcmds/*";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.policy=/files/policies/group.policy";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.debug=*";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Dsun.rmi.*";
|
||||
.fl
|
||||
};
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
最初に付与されているアクセス権は、\f2rmid\fPに対し、パス名により明示的に指定される\f2java\fPコマンドの1.7.0バージョンの実行を許可します。デフォルトでは、\f2java.home\fPにあるバージョンの\f2java\fPコマンドを使用します。\f2rmid\fPが使用するのと同じバージョンが使用されるため、そのコマンドは、ポリシー・ファイルで指定する必要はありません。2番目のアクセス権は、\f2rmid\fPに対して、ディレクトリ\f2/files/apps/rmidcmds\fP内の任意のコマンドの実行権限を許可します。
|
||||
.LP
|
||||
3番目に付与されているアクセス権\f2ExecOptionPermission\fPは、\f2rmid\fPに対して、セキュリティ・ポリシー・ファイルを\f2/files/policies/group.policy\fPとして定義している起動グループの開始を許可します。次のアクセス権は、起動グループが\f2java.security.debug\fPプロパティを使用することを許可しています。最後のアクセス権は、起動グループが\f2sun.rmi\fPというプロパティ名の階層内の任意のプロパティを使用することを許可しています。
|
||||
.LP
|
||||
ポリシー・ファイルを指定して\f2rmid\fPを起動するには、\f2rmid\fPのコマンドラインで\f2java.security.policy\fPプロパティを指定する必要があります。次に例を示します。
|
||||
.LP
|
||||
\f2rmid \-J\-Djava.security.policy=rmid.policy\fP
|
||||
.RE
|
||||
.TP 2
|
||||
o
|
||||
\f4<policyClassName>\fP
|
||||
.LP
|
||||
デフォルトの動作では十分な柔軟性が得られない場合、管理者は、\f2rmid\fPの起動時に、\f2checkExecCommand\fPメソッドが所属するクラスの名前を指定して、rmidが実行するコマンドをチェックすることができます。
|
||||
.LP
|
||||
\f2policyClassName\fPには、引数なしのコンストラクタを持ち、次のような\f2checkExecCommand\fPメソッドを実装しているpublicクラスを指定します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
public void checkExecCommand(ActivationGroupDesc desc,
|
||||
.fl
|
||||
String[] command)
|
||||
.fl
|
||||
throws SecurityException;
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
アクティブ化グループを開始する前に、\f2rmid\fPは、ポリシーの\f2checkExecCommand\fPメソッドを呼び出します。このとき、アクティブ化グループの記述子と、アクティブ化グループを開始するための完全なコマンドを含む配列をそのメソッドに渡します。\f2checkExecCommand\fPが\f2SecurityException\fPをスローすると、\f2rmid\fPはそのアクティブ化グループを開始せず、オブジェクトのアクティブ化を試行している呼出し側には\f2ActivationException\fPがスローされます。
|
||||
.TP 2
|
||||
o
|
||||
\f3none\fP
|
||||
.LP
|
||||
\f2sun.rmi.activation.execPolicy\fPプロパティの値が「none」の場合、\f2rmid\fPは、起動グループを開始するコマンドをまったく検証しません。
|
||||
.RE
|
||||
.LP
|
||||
.TP 3
|
||||
\-log dir
|
||||
起動システム・デーモンがデータベースおよび関連情報を書き込むのに使用するディレクトリの名前を指定します。デフォルトでは、\f2rmid\fPコマンドを実行したディレクトリに、\f2log\fPというログ・ディレクトリが作成されます。
|
||||
.LP
|
||||
.TP 3
|
||||
\-port port
|
||||
\f2rmid\fPのレジストリが使用するポートを指定します。起動システム・デーモンは、このレジストリの中で、\f2java.rmi.activation.ActivationSystem\fPという名前で\f2ActivationSystem\fPをバインドします。したがって、ローカル・マシン上の\f2ActivationSystem\fPは、次のように\f2Naming.lookup\fPメソッドを呼び出すことによって取得できます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.rmi.*;
|
||||
.fl
|
||||
import java.rmi.activation.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
ActivationSystem system; system = (ActivationSystem)
|
||||
.fl
|
||||
Naming.lookup("//:\fP\f4port\fP/java.rmi.activation.ActivationSystem");
|
||||
.fl
|
||||
.fi
|
||||
.TP 3
|
||||
\-stop
|
||||
\f2\-port\fPオプションによって指定されたポートの、現在の\f2rmid\fP呼出しを停止します。ポートが指定されていない場合は、ポート1098で実行されている\f2rmid\fPを停止します。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "環境変数"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
CLASSPATH
|
||||
ユーザー定義クラスへのパスをシステムに指定します。ディレクトリはコロンで分割します。次に例を示します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.LP
|
||||
rmic(1)、
|
||||
.na
|
||||
\f2CLASSPATH\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/tools/index.html#classpath、java(1)
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
." Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH rmiregistry 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
rmiregistry \- Javaリモート・オブジェクト・レジストリ
|
||||
.LP
|
||||
.RS 3
|
||||
\f3rmiregistry\fPコマンドは、現在のホストの指定したポート上にリモート・オブジェクト・レジストリを開始します。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry [\fP\f4port\fP\f3]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f3rmiregistry\fPコマンドは、現在のホストの指定\f2port\fP上にリモート・オブジェクト・レジストリを作成し、開始します。\f2port\fPの指定を省略した場合、レジストリはポート1099で開始します。\f3rmiregistry\fPコマンドに、出力機能はありません。通常、これはバックグラウンドで実行されます。次に例を示します。
|
||||
.LP
|
||||
.LP
|
||||
\f2rmiregistry &\fP
|
||||
.LP
|
||||
.LP
|
||||
リモート・オブジェクト・レジストリは、ブートストラップのネーム・サービスです。同一ホストのRMIサーバーが、リモート・オブジェクトを名前にバインドするために使用されます。次に、ローカルおよびリモート・ホストのクライアントはリモート・オブジェクトを検索し、リモート・メソッドの呼出しを行います。
|
||||
.LP
|
||||
.LP
|
||||
レジストリは、一般的に、最初のリモート・オブジェクトの位置を指定します。そこで、アプリケーションはメソッドを呼び出す必要があります。かわって、そのオブジェクトはアプリケーション指定のサポートを提供し、他のオブジェクトを探します。
|
||||
.LP
|
||||
.LP
|
||||
\f2java.rmi.registry.LocateRegistry\fPクラスのメソッドは、ローカル・ホスト、またはローカル・ホストとポートで動作するレジストリを取得するために使用されます。
|
||||
.LP
|
||||
.LP
|
||||
\f2java.rmi.Naming\fPクラスのURLベースのメソッドは、レジストリで動作し、任意のホストおよびローカル・ホスト上のリモート・オブジェクトの検索に使用されます。リモート・オブジェクトに単純な(文字列)名前をバインドしたり、新しい名前をリバインド(古いバインドにオーバーライド)します。またリモート・オブジェクトをアンバインドしたり、レジストリにバインドされたURLを出力します。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-J
|
||||
\f2\-J\fPの後ろに続くオプションを\f2java\fPインタプリタに引き渡します。\f2java\fPオプションと組み合せて使用します(\-Jとjavaオプションの間にスペースは入れない)。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
java(1)、
|
||||
.na
|
||||
\f2java.rmi.registry.LocateRegistry\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/api/java/rmi/registry/LocateRegistry.htmlおよび
|
||||
.na
|
||||
\f2java.rmi.Naming\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/api/java/rmi/Naming.html
|
||||
@@ -0,0 +1,94 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH servertool 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
servertool \- Java(tm)IDLサーバー・ツール
|
||||
.LP
|
||||
\f3servertool\fPはアプリケーション・プログラマが、永続サーバーの登録、登録解除、起動および停止を行うためのコマンドライン・インタフェースを提供します。
|
||||
.SH "形式"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool \-ORBInitialPort \fP\f4nameserverport\fP\f3 \fP\f3options\fP\f3 [ \fP\f3commands\fP\f3 ]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
コマンドを入力しないで\f2servertool\fPを起動すると、コマンドライン・ツールとして\f2servertool >\fPプロンプトが表示されます。\f2servertool >\fPプロンプトにコマンドを入力します。
|
||||
.LP
|
||||
.LP
|
||||
コマンドを入力して\f2servertool\fPを起動すると、Java IDLサーバー・ツールが起動し、コマンドを実行して終了します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-ORBInitialPort\fP \f2nameserverport\fPオプションは\f3必須\fPです。\f2nameserverport\fPの値には、\f2orbd\fPが実行され、着信リクエストを待機しているポートを指定する必要があります。Solarisソフトウェアを使用する場合、1024より小さいポート上でプロセスを開始するには、rootユーザーになる必要があります。このため、\f2nameserverport\fPとして1024以上のポート番号を使用することをお薦めします。
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPはアプリケーション・プログラマが、永続サーバーの登録、登録解除、起動および停止を行うためのコマンドライン・インタフェースを提供します。その他に、サーバーに関する様々な統計情報を取得するためのコマンドも提供します。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-ORBInitialHost nameserverhost
|
||||
ネーム・サーバーが、実行され、着信リクエストを待機しているホスト・マシンを指定します。このオプションを指定しない場合、\f2nameserverhost\fPはデフォルトで\f2localhost\fPに設定されます。\f2orbd\fPと\f2servertool\fPが異なるマシン上で実行されている場合は、\f2orbd\fPが実行されているホストの名前とIPアドレスを指定する必要があります。
|
||||
.TP 3
|
||||
\-Joption
|
||||
Java仮想マシンに\f2option\fPを渡します。\f2option\fPには、java(1)のリファレンス・ページに記載されているオプションを1つ指定します。たとえば、\f3\-J\-Xms48m\fPと指定すると、スタートアップ・メモリーは48Mバイトに設定されます。\f3\-J\fPを使用して背後の仮想マシンにオプションを渡すことはよく行われています。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "コマンド"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
register \-server\ <server\ class\ name> \ \-classpath\ <classpath\ to\ server> [\ \-applicationName\ <application\ name> \-args\ <args\ to\ server> \-vmargs\ <flags\ to\ be\ passed\ to\ Java\ VM> \ ]
|
||||
Object Request Broker Daemon(ORBD)に新規永続サーバーを登録します。サーバーが未登録の場合、登録してアクティブ化します。このコマンドによって、\f2\-server\fPオプションで識別されるサーバーのメイン・クラス内でインストール・メソッドが呼び出されます。このインストール・メソッドは、\f2public static void install(org.omg.CORBA.ORB)\fPになっている必要があります。インストール・メソッドは、オプションであり、データベース・スキーマの作成などの独自のサーバー・インストール動作を開発者が指定できます。
|
||||
.TP 3
|
||||
unregister \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
サーバーIDまたはアプリケーション名を使用して、ORBDのサーバーの登録を解除します。このコマンドによって、\f2\-server\fPオプションで識別されるサーバーのメイン・クラス内でアンインストール・メソッドが呼び出されます。このアンインストール・メソッドは、\f2public static void uninstall(org.omg.CORBA.ORB)\fPになっている必要があります。アンインストール・メソッドは、オプションであり、インストール・メソッドの動作の取り消しなどの独自のサーバー・アンインストール動作を開発者が指定できます。
|
||||
.TP 3
|
||||
getserverid \-applicationName\ <application\ name>
|
||||
アプリケーションに関連付けられているサーバーIDを返します。
|
||||
.TP 3
|
||||
list
|
||||
ORBDに登録されているすべての永続サーバーに関する情報を一覧表示します。
|
||||
.TP 3
|
||||
listappnames
|
||||
現在ORBDに登録されているすべてのサーバーのアプリケーション名を一覧表示します。
|
||||
.TP 3
|
||||
listactive
|
||||
ORBDによって起動され、現在実行されているすべての永続サーバーに関する情報を一覧表示します。
|
||||
.TP 3
|
||||
locate \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name> [\-endpointType\ <endpointType>\ ]
|
||||
登録されたサーバーで作成したすべてのORBの特定のタイプについてエンドポイント(ポート)を検出します。サーバーが実行されていない場合、アクティブ化されます。エンドポイント・タイプが指定されていない場合、サーバーのORBごとに関連付けられているplainタイプまたはnon\-protectedタイプのエンドポイントが返されます。
|
||||
.TP 3
|
||||
locateperorb \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name> [\-orbid\ <ORB\ name>\ ]
|
||||
登録されたサーバーの特定のORBで登録されたエンドポイント(ポート)を検出します。サーバーが実行されていない場合、アクティブ化されます。\f2orbid\fPが指定されていない場合は、デフォルト値の「""」が\f2orbid\fPに割り当てられます。ORBが空文字列の\f2orbid\fPで作成されている場合、登録したポートがすべて返されます。
|
||||
.TP 3
|
||||
orblist \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
サーバー上に定義されたORBのORBIdを一覧表示します。ORBIdはサーバーで作成されたORBの文字列名です。サーバーが実行されていない場合、アクティブ化されます。
|
||||
.TP 3
|
||||
shutdown \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
ORBDに登録されたアクティブなサーバーを停止します。このコマンドの実行中に、\f2\-serverid\fPパラメータまたは\f2\-applicationName\fPパラメータで指定されたクラス内に定義された\f2shutdown()\fPメソッドも呼び出されてサーバー・プロセスを正しく停止します。
|
||||
.TP 3
|
||||
startup \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
ORBDに登録されたサーバーを起動します。サーバーが実行されていない場合は、このコマンドでサーバーを起動します。サーバーがすでに実行されている場合は、ユーザーにエラー・メッセージが返されます。
|
||||
.TP 3
|
||||
help
|
||||
サーバーがサーバー・ツールで使用できるすべてのコマンドを表示します。
|
||||
.TP 3
|
||||
quit
|
||||
サーバー・ツールを終了します。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
orbd(1)
|
||||
@@ -0,0 +1,475 @@
|
||||
." Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH tnameserv 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
Java IDL: 一時ネーム・サービス \- \f2tnameserv\fP
|
||||
.LP
|
||||
.LP
|
||||
このドキュメントでは、Java IDL一時ネーム・サービス\f2tnameserv\fPの使用方法について説明します。Java IDLには、Object Request Broker Daemon(ORBD)も含まれています。ORBDは、ブートストラップ・サービス、一時ネーム・サービス、\f3永続\fPネーム・サービスおよびサーバー・マネージャを含むデーモン・プロセスです。Java IDLのすべてのチュートリアルではORBDを使用していますが、一時ネーム・サービスを使用する例では、\f2orbd\fPのかわりに\f2tnameserv\fPを使用できます。\f2orbd\fPツールの詳細は、orbdのorbd(1)または
|
||||
.na
|
||||
\f2ORBDに含まれるJava IDLネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.htmlに関するトピックを参照してください。
|
||||
.LP
|
||||
.LP
|
||||
ここでは、以下の項目について説明します。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Java\ IDL一時ネーム・サービス
|
||||
.TP 2
|
||||
o
|
||||
Java\ IDL一時ネーム・サービスの起動
|
||||
.TP 2
|
||||
o
|
||||
Java\ IDL一時ネーム・サービスの停止
|
||||
.TP 2
|
||||
o
|
||||
サンプル・クライアント: 名前空間へのオブジェクトの追加
|
||||
.TP 2
|
||||
o
|
||||
サンプル・クライアント: 名前空間のブラウズ
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Java IDL一時ネーム・サービス"
|
||||
.LP
|
||||
.LP
|
||||
CORBAのCOS(Common Object Services)ネーム・サービスは、ファイル・システムがファイルに対してディレクトリ構造を提供しているのと同じように、オブジェクト参照に対してツリー構造のディレクトリを提供します。Java IDLの一時ネーム・サービスである\f2tnameserv\fPは、COSネーム・サービスの仕様を単純な形で実装したものです。
|
||||
.LP
|
||||
.LP
|
||||
オブジェクト参照は名前空間に名前で格納され、オブジェクト参照と名前のペアは、それぞれネーム・\f2バインディング\fPと呼ばれます。ネーム・バインディングは\f2ネーミング・コンテキスト\fPに組み込むことができます。ネーミング・コンテキストはそれ自体がネーム・バインディングであり、ファイル・システムのサブディレクトリと同じ編成機能を持ちます。すべてのバインディングは\f2初期ネーミング・コンテキスト\fPに格納されます。名前空間において、初期ネーミング・コンテキストは唯一の永続的バインディングです。それ以外のネーミング・コンテキストは、Java IDLのネーミング・サービス・プロセスが停止し、再起動されると失われます。
|
||||
.LP
|
||||
.LP
|
||||
アプレットまたはアプリケーションからCOSネーム・サービスを使用するためには、そのORBがネーム・サービスが動作しているホストのポートを知っているか、そのネーム・サービスの文字列化された初期ネーミング・コンテキストにアクセスできる必要があります。ネーム・サービスは、Java IDLのネーム・サービスでもその他のCOS準拠のネーム・サービスでもかまいません。
|
||||
.LP
|
||||
.SH "Java IDL一時ネーム・サービスの起動"
|
||||
.LP
|
||||
.LP
|
||||
Java IDLネーム・サービスは、ネーム・サービスを使用するアプリケーションまたはアプレットより前に起動しておく必要があります。Java\ IDL製品をインストールすると、Java\ IDLネーム・サービスを起動するスクリプト(Solaris: \f2tnameserv\fP)または実行可能ファイル(Windows NT: \f2tnameserv.exe\fP)が作成されます。バックグラウンドで動作するように、ネーム・サービスを起動してください。
|
||||
.LP
|
||||
.LP
|
||||
特に指定しない場合、Java IDLネーム・サービスは、ORBの\f2resolve_initial_references()\fPメソッドと\f2list_initial_references()\fPメソッドの実装に使用するブートストラップ・プロトコルに対してポート900で待機します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort \fP\f4nameserverport\fP\f3&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
ネーム・サーバー・ポートを指定しない場合、デフォルトでポート900が使用されます。Solarisソフトウェアの実行時は、1024より小さいポートでプロセスを開始する場合、rootユーザーになる必要があります。このため、1024以上のポート番号を使用することをお薦めします。1050のように別のポートを指定し、ネーム・サービスをバックグラウンドで実行するには、UNIXコマンド・シェルで次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort 1050&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
WindowsのMS\-DOSシステム・プロンプトでは、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start tnameserv \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
ネーム・サーバーのクライアントには、新しいポート番号を知らせる必要があります。これを行うには、ORBオブジェクトの作成時に\f2org.omg.CORBA.ORBInitialPort\fPプロパティに新しいポート番号を設定します。
|
||||
.LP
|
||||
.SS
|
||||
異なるマシン上でのクライアントとサーバーの実行
|
||||
.LP
|
||||
.LP
|
||||
Java IDLとRMI\-IIOPのほとんどのチュートリアルでは、ネーム・サービス、サーバーおよびクライアントはすべて開発用のマシン上で実行されます。実際にデプロイメントする場合には、クライアントとサーバーを、ネーム・サービスとは異なるホスト上で実行することが多くなります。
|
||||
.LP
|
||||
.LP
|
||||
クライアントとサーバーがネーム・サービスを見つけるには、クライアントとサーバーが、ネーム・サービスが実行されているポートの番号とホストを認識している必要があります。そのためには、クライアントとサーバーのファイル内の\f2org.omg.CORBA.ORBInitialPort\fPプロパティと\f2org.omg.CORBA.ORBInitialHost\fPプロパティをネーム・サービスが実行されているポートの番号とマシンの名前に設定します。この例は、
|
||||
.na
|
||||
\f2RMI\-IIOPを使用したHello Worldの例\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/rmi\-iiop/rmiiiopexample.htmlに示されています。コマンドライン・オプション\f2\-ORBInitialPort\fP \f2nameserverport#\fPと\f2\-ORBInitialHost\fP \f2nameserverhostname\fPを使用して、クライアントとサーバーに対してネーム・サービスを探す場所を指定することもできます。
|
||||
.na
|
||||
\f2Java IDL: 2台のマシン上で実行するHello Worldプログラム\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/tutorial/jidl2machines.htmlには、コマンドライン・オプションを使用して指定する方法が示されています。
|
||||
.LP
|
||||
.LP
|
||||
たとえば、一時ネーム・サービス\f2tnameserv\fPが、ホスト\f2nameserverhost\fPのポート1050上で実行されているとします。さらに、クライアントがホスト\f2clienthost\fP上で実行され、サーバーはホスト\f2serverhost\fP上で実行されているとします。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
次のように、ホスト\f2nameserverhost\fP上で\f2tnameserv\fPを起動します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort 1050
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 2
|
||||
o
|
||||
次のように、\f2serverhost\fP上でサーバーを起動します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java Server \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 2
|
||||
o
|
||||
次のように、\f2clienthost\fP上でクライアントを起動します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java Client \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
\-Jオプション
|
||||
.LP
|
||||
このコマンドライン・オプションは、\f2tnameserve\fPとともに使用できます。
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Joption
|
||||
Java仮想マシンに\f2option\fPを渡します。\f2option\fPには、java(1)のリファレンス・ページに記載されているオプションを1つ指定します。たとえば、\f3\-J\-Xms48m\fPと指定すると、スタートアップ・メモリーは48Mバイトに設定されます。\f3\-J\fPを使用して背後の仮想マシンにオプションを渡すことはよく行われています。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Java IDL一時ネーム・サービスの停止"
|
||||
.LP
|
||||
.LP
|
||||
Java IDLネーム・サービスを停止するには、Unixの場合は、\f2kill\fPなどのオペレーティング・システムのコマンドを使用し、Windowsの場合は、\f2[Ctrl]+[C]\fPキーを使用します。ネーム・サービスを明示的に停止するまでは、呼出し待機状態が続きます。サービスを終了させると、Java IDLネーム・サービスに登録されている名前は失われます。
|
||||
.LP
|
||||
.SH "サンプル・クライアント: 名前空間へのオブジェクトの追加"
|
||||
.LP
|
||||
.LP
|
||||
次に示すサンプル・プログラムは、名前を名前空間に追加する方法を示すものです。このサンプル・プログラムは、このままの状態で完全に動作する一時ネーム・サービス・クライアントで、次のような単純なツリーを作成するものです。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f4初期ネーミング・コンテキスト\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
*
|
||||
\f3plans\fP
|
||||
.TP 2
|
||||
*
|
||||
\f4Personal\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
-
|
||||
\f3calendar\fP
|
||||
.TP 2
|
||||
-
|
||||
\f3schedule\fP
|
||||
.RE
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
この例で、\f3plans\fPはオブジェクト参照、\f3Personal\fPは\f3calendar\fPと\f3schedule\fPの2つのオブジェクト参照を含むネーミング・コンテキストです。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.util.Properties;
|
||||
.fl
|
||||
import org.omg.CORBA.*;
|
||||
.fl
|
||||
import org.omg.CosNaming.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class NameClient
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
public static void main(String args[])
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
try {
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
前述のJava IDL一時ネーム・サービスの起動で、ネーム・サーバーはポート1050を使用して起動しました。次のコードで、このポート番号をクライアント・システムに知らせます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、初期ネーミング・コンテキストを取得し、それを\f3ctx\fPに代入します。2行目では、\f3ctx\fPをダミーのオブジェクト参照\f3objref\fPにコピーします。このobjrefには、あとで様々な名前を割り当てて名前空間に追加します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NamingContext ctx =
|
||||
.fl
|
||||
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
|
||||
.fl
|
||||
NamingContext objref = ctx;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、textタイプの名前plansを作成し、それをダミーのオブジェクト参照にバインドします。その後、\f2rebind\fPを使用して初期ネーミング・コンテキストの下にplansを追加しています。\f2rebind\fPメソッドを使用すれば、\f2bind\fPを使用した場合に発生する例外を発生させずに、このプログラムを何度も繰返し実行できます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc1 = new NameComponent("plans", "text");
|
||||
.fl
|
||||
NameComponent[] name1 = {nc1};
|
||||
.fl
|
||||
ctx.rebind(name1, objref);
|
||||
.fl
|
||||
System.out.println("plans rebind successful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、directoryタイプのPersonalというネーミング・コンテキストを作成します。その結果得られるオブジェクト参照\f3ctx2\fPをこの名前にバインドし、初期ネーミング・コンテキストに追加します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc2 = new NameComponent("Personal", "directory");
|
||||
.fl
|
||||
NameComponent[] name2 = {nc2};
|
||||
.fl
|
||||
NamingContext ctx2 = ctx.bind_new_context(name2);
|
||||
.fl
|
||||
System.out.println("new naming context added..");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
残りのコードでは、ダミーのオブジェクト参照をscheduleとcalendarという名前でネーミング・コンテキスト「Personal」(\f3ctx2\fP)にバインドします。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc3 = new NameComponent("schedule", "text");
|
||||
.fl
|
||||
NameComponent[] name3 = {nc3};
|
||||
.fl
|
||||
ctx2.rebind(name3, objref);
|
||||
.fl
|
||||
System.out.println("schedule rebind successful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
NameComponent nc4 = new NameComponent("calender", "text");
|
||||
.fl
|
||||
NameComponent[] name4 = {nc4};
|
||||
.fl
|
||||
ctx2.rebind(name4, objref);
|
||||
.fl
|
||||
System.out.println("calender rebind successful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
|
||||
.fl
|
||||
} catch (Exception e) {
|
||||
.fl
|
||||
e.printStackTrace(System.err);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "サンプル・クライアント: 名前空間のブラウズ"
|
||||
.LP
|
||||
.LP
|
||||
次のサンプル・プログラムでは、名前空間をブラウズする方法を示します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.util.Properties;
|
||||
.fl
|
||||
import org.omg.CORBA.*;
|
||||
.fl
|
||||
import org.omg.CosNaming.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class NameClientList
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
public static void main(String args[])
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
try {
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
前述のJava IDL一時ネーム・サービスの起動で、ネーム・サーバーはポート1050を使用して起動しました。次のコードで、このポート番号をクライアント・システムに知らせます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、初期ネーミング・コンテキストを取得しています。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NamingContext nc =
|
||||
.fl
|
||||
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
\f2list\fPメソッドは、ネーミング・コンテキストのバインディングをリストします。この場合、最大1000個までのバインディングが初期ネーミング・コンテキストからBindingListHolderに返されます。残りのバインディングは、BindingIteratorHolderに返されます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
BindingListHolder bl = new BindingListHolder();
|
||||
.fl
|
||||
BindingIteratorHolder blIt= new BindingIteratorHolder();
|
||||
.fl
|
||||
nc.list(1000, bl, blIt);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、返されたBindingListHolderからバインディングの配列を取得します。バインディングがない場合は、プログラムが終了します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Binding bindings[] = bl.value;
|
||||
.fl
|
||||
if (bindings.length == 0) return;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
残りのコードでは、バインディングに対してループ処理を行い、名前を出力します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
for (int i=0; i < bindings.length; i++) {
|
||||
.fl
|
||||
|
||||
.fl
|
||||
// get the object reference for each binding
|
||||
.fl
|
||||
org.omg.CORBA.Object obj = nc.resolve(bindings[i].binding_name);
|
||||
.fl
|
||||
String objStr = orb.object_to_string(obj);
|
||||
.fl
|
||||
int lastIx = bindings[i].binding_name.length\-1;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
// check to see if this is a naming context
|
||||
.fl
|
||||
if (bindings[i].binding_type == BindingType.ncontext) {
|
||||
.fl
|
||||
System.out.println( "Context: " +
|
||||
.fl
|
||||
bindings[i].binding_name[lastIx].id);
|
||||
.fl
|
||||
} else {
|
||||
.fl
|
||||
System.out.println("Object: " +
|
||||
.fl
|
||||
bindings[i].binding_name[lastIx].id);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
|
||||
.fl
|
||||
} catch (Exception e) {
|
||||
.fl
|
||||
e.printStackTrace(System.err);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH unpack200 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
unpack200 \- JARアンパック・ツール
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
形式
|
||||
.TP 2
|
||||
o
|
||||
説明
|
||||
.TP 2
|
||||
o
|
||||
オプション
|
||||
.TP 2
|
||||
o
|
||||
終了ステータス
|
||||
.TP 2
|
||||
o
|
||||
関連項目
|
||||
.TP 2
|
||||
o
|
||||
注意
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.LP
|
||||
\f4unpack200\fP\f2 [ \fP\f2options\fP ] \f2input\-file\fP \f2JAR\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
オプションの指定順序に決まりはありません。コマンドラインに指定された最後のオプションが、それ以前に指定されたすべてのオプションより優先されます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
input\-file
|
||||
入力ファイルの名前。pack200 gzipファイルかpack200ファイルを指定できます。この他に、0を設定すればpack200(1)から作成されたJARファイルも入力として使用できます。この場合、入力ファイルの内容がPack200マーカーとともに出力JARファイルにコピーされます。
|
||||
.TP 3
|
||||
JAR\-file
|
||||
出力JARファイル名。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f2unpack200\fPは、\f2pack200\fP(1)で作成されたパック・ファイルをJARファイルに変換するネイティブ実装です。一般的な使用方法:
|
||||
.LP
|
||||
.LP
|
||||
\f2% unpack200 myarchive.pack.gz myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
この例では、デフォルトの\f2unpack200\fPの設定で、\f2myarchive.pack.gz\fPから\f2myarchive.jar\fPが作成されます。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
JARファイル内のすべてのエントリに\f2true\fP、\f2false\fPまたは\f2keep\fPのデフレーションを設定します。デフォルト・モードは\f2keep\fPです。\f2true\fPまたは\f2false\fP場合、デフォルトの動作をオーバーライドして、出力JARファイル内のすべてのエントリのデフレーション・モードが設定されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-r \-\-remove\-pack\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
入力パック・ファイルを削除します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-v \-\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
最小限のメッセージを出力します。このオプションを複数指定すると、より長いメッセージが出力されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-q \-\-quiet\fP
|
||||
.LP
|
||||
.LP
|
||||
メッセージを表示せずに動作するように指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
|
||||
.LP
|
||||
.LP
|
||||
出力メッセージのログ・ファイルを指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-? \-h \-\-help\fP
|
||||
.LP
|
||||
.LP
|
||||
このコマンドに関するヘルプ情報を出力します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-V \-\-version\fP
|
||||
.LP
|
||||
.LP
|
||||
このコマンドに関するバージョン情報を出力します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-J\fP\f2option\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2unpack200\fPによって呼び出されるJava起動ツールに\f2option\fPを渡します。
|
||||
.LP
|
||||
.SH "終了ステータス"
|
||||
.LP
|
||||
.LP
|
||||
次の終了値が返されます。
|
||||
.LP
|
||||
.LP
|
||||
\f2\ 0\fP: 正常終了した場合
|
||||
.LP
|
||||
.LP
|
||||
\f2>0\fP: エラーが発生した場合
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
pack200(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java SEのドキュメント\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/index.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Javaデプロイメント・ガイド \- Pack200\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
|
||||
.TP 2
|
||||
o
|
||||
jar(1) \- Java Archiveツール
|
||||
.TP 2
|
||||
o
|
||||
jarsigner(1) \- JAR署名ツール
|
||||
.TP 2
|
||||
o
|
||||
\f2attributes(5)\fPのマニュアル・ページ
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "注意"
|
||||
.LP
|
||||
.LP
|
||||
このコマンドと\f2unpack(1)\fPを混同しないでください。これらは別製品です。
|
||||
.LP
|
||||
.LP
|
||||
JDKに付属するJava SE API仕様との相違が見つかった場合には、仕様を優先してください。
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,900 @@
|
||||
." Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH java 1 "11 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "NAME"
|
||||
java \- Javaアプリケーションを起動します。
|
||||
.SH "形式"
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java [ \fIoptions\fR ] class [ \fIargument \&.\&.\&.\fR ]
|
||||
java [ \fIoptions\fR ] \-jar file\&.jar [ \fIargument \&.\&.\&.\fR ]
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
\fIオプション\fR
|
||||
.RS 4
|
||||
コマンドライン・オプション。オプションを参照してください。
|
||||
.RE
|
||||
.PP
|
||||
クラス
|
||||
.RS 4
|
||||
コールするクラスの名前。
|
||||
.RE
|
||||
.PP
|
||||
\fIfile\&.jar\fR
|
||||
.RS 4
|
||||
コールするJARファイルの名前。\fI\-jar\fRコマンドでのみ使用されます。
|
||||
.RE
|
||||
.PP
|
||||
\fI引数\fR
|
||||
.RS 4
|
||||
\fImain\fR関数に渡される引数。
|
||||
.RE
|
||||
.SH "説明"
|
||||
.PP
|
||||
\fIjava\fRコマンドはJavaアプリケーションを開始します。Java Runtime Environmentを起動した後、指定されたクラスをロードし、そのクラスの\fImain\fRメソッドをコールすることにより、これを行います。
|
||||
.PP
|
||||
このメソッドは、publicおよびstaticとして宣言する必要があります。また、値は返せません。さらに、String配列をパラメータとして指定できる必要があります。メソッド宣言は次の形式を含みます。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
public static void main(String args[]
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.PP
|
||||
デフォルトでは、オプションのない最初の引数が、コールされるクラスの名前になります。完全修飾クラス名を使用する必要があります。\fI\-jar\fRオプションを指定した場合、コマンドライン・オプション以外の最初の引数が、アプリケーションのクラス・ファイルとリソース・ファイルを含むJARファイルの名前になります。この場合、マニフェストのMain\-Classヘッダーで指定されたクラスが起動クラスになります。
|
||||
.PP
|
||||
Java Runtimeは、ブートストラップ・クラス・パス、インストール済拡張機能およびユーザー・クラス・パスの3箇所から起動クラスと他の使用されているクラスを検索します。
|
||||
.PP
|
||||
クラス名またはJARファイル名の後にある、コマンドライン・オプション以外の引数は、\fImain\fR関数に渡されます。
|
||||
.SH "オプション"
|
||||
.PP
|
||||
起動ツールには、現在のランタイム環境でサポートされる標準オプションのセットがあります。
|
||||
.PP
|
||||
また、仮想マシンの現在の実装では、非標準オプションのセットもサポートされます。これは、将来のリリースで変更される可能性があります。非標準オプションを参照してください。
|
||||
.SS "標準オプション"
|
||||
.PP
|
||||
\-client
|
||||
.RS 4
|
||||
Java HotSpot VMクライアントを選択します。64ビット対応JDKは現時点では、このオプションを無視し、かわりにJava Hotspot Server VMを使用します。
|
||||
.sp
|
||||
デフォルトのJava VM選択は、次の\fI「サーバークラス・マシンの検出」\fRページを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guides/vm/server\-class\&.html
|
||||
.RE
|
||||
.PP
|
||||
\-server
|
||||
.RS 4
|
||||
Java HotSpot VMサーバーを選択します。64ビット対応JDK上では、サポートされるのはJava Hotspot Server VMのみであるため、\fI\-\fR\fIserver\fRオプションが暗黙的に選択されます。
|
||||
.sp
|
||||
デフォルトのJava VM選択は、次の「サーバークラス・マシンの検出」ページを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guides/vm/server\-class\&.html
|
||||
.RE
|
||||
.PP
|
||||
\-agentlib:\fIlibname\fR[\fI=options\fR]
|
||||
.RS 4
|
||||
次の例のようなネイティブ・エージェント・ライブラリ\fIlibname\fRをロードします。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-agentlib:hprof
|
||||
|
||||
\-agentlib:jdwp=help
|
||||
|
||||
\-agentlib:hprof=help
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
次の\fI「JVMTIエージェント・コマンドライン・オプション」\fRを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/platform/jvmti/jvmti\&.html#starting
|
||||
.RE
|
||||
.PP
|
||||
\-agentpath:\fIpathname\fR[\fI=options\fR]
|
||||
.RS 4
|
||||
フル\fIパス名\fRを使用して、ネイティブ・エージェント・ライブラリをロードします。次の\fI「JVMTIコマンドライン・オプション」\fRを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/platform/jvmti/jvmti\&.html#starting
|
||||
.RE
|
||||
.PP
|
||||
\-classpath \fIclasspath\fR, \-cp \fIclasspath\fR
|
||||
.RS 4
|
||||
クラス・ファイルを検索するディレクトリ、JARファイルおよびZIPアーカイブのリストを指定します。
|
||||
\fIクラス・パス・エントリはコロン(:)で区切ります。\fR\fI\-classpath\fRまたは\fI\-cp\fRを指定すると、このオプションの値によって\fICLASSPATH\fR環境変数の設定がオーバーライドされます。
|
||||
.sp
|
||||
\fI\-classpath\fRと\fI\-cp\fRが使用されず、\fICLASSPATH\fRが設定されていない場合、ユーザー・クラス・パスは現在のディレクトリ(\&.)から構成されます。
|
||||
.sp
|
||||
便宜上、\fI*\fRのベース名を含むクラス・パス要素は、\&.jarまたは\&.JARを拡張子に持つディレクトリ内のすべてのファイルのリストを指定するのと同等とみなされます。Javaプログラムは2つの呼出しの違いを認識できません。
|
||||
.sp
|
||||
たとえば、ディレクトリmydirにa\&.jarとb\&.JARが含まれている場合、クラス・パス要素\fImydir/*\fRはA\&.jar:b\&.JARに展開されますが、JARファイルの順番は未指定となります。このリストには、隠しファイルも含め、指定されたディレクトリ内のすべてのJARファイルが含まれます。\fI*\fRのみからなるクラス・パス・エントリは、現在のディレクトリ内のすべてのJARファイルのリストに展開されます。\fICLASSPATH\fR環境変数も、定義時には同様に展開されます。クラス・パス・ワイルドカード拡張は、Java VMの開始前に行われます。Javaプログラムは、環境を問い合せる場合を除き、拡張されていないワイルド・カードを参照しません。たとえば、\fISystem\&.getenv("CLASSPATH")\fRをコールして問い合せる場合です。
|
||||
.RE
|
||||
.PP
|
||||
\-D\fIproperty=value\fR
|
||||
.RS 4
|
||||
システム・プロパティの値を設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-d32
|
||||
.RS 4
|
||||
アプリケーションを32ビット環境で実行します。32ビット環境がインストールされていないかサポートされていない場合は、エラーが報告されます。デフォルトでは、64ビット専用システムが使用されている場合を除き、アプリケーションは32ビット環境で実行されます。
|
||||
.RE
|
||||
.PP
|
||||
\-d64
|
||||
.RS 4
|
||||
アプリケーションを64ビット環境で実行します。64ビット環境がインストールされていないかサポートされていない場合は、エラーが報告されます。デフォルトでは、64ビット専用システムが使用されている場合を除き、アプリケーションは32ビット環境で実行されます。
|
||||
.sp
|
||||
現在のところ、Java HotSpot Server VMのみが64ビットの操作をサポートしているため、\fI\-d64\fR使用時には\fI\-server\fRオプションが暗黙的に使用されます。\fI\-d64\fR使用時には、\fI\-client\fRオプションは無視されます。この仕様は、将来のリリースでは変更になる可能性があります。
|
||||
.RE
|
||||
.PP
|
||||
\-disableassertions[:\fIpackage name\fR"\&.\&.\&." | :\fIclass name\fR ], \-da[:\fIpackage name\fR"\&.\&.\&." | :\fIclass name\fR ]
|
||||
.RS 4
|
||||
アサーションを無効にします。これがデフォルトです。
|
||||
.sp
|
||||
引数なしの\fIdisableassertions\fRまたは\fI\-da\fRを指定すると、アサーションが無効になります。「\fI\&.\&.\&.\fR」で終わる引数を1つ指定すると、指定したパッケージとそのサブパッケージ内でアサーションが無効になります。引数として\fI"\&.\&.\&."\fRを指定すると、現在の作業ディレクトリにある名前のないパッケージ内でアサーションが無効になります。「\fI\&.\&.\&.\fR」で終わらない引数を1つ指定すると、指定したクラス内でアサーションが無効になります。
|
||||
.sp
|
||||
パッケージ\fIcom\&.wombat\&.fruitbat\fR内ではアサーションを有効にし、クラス\fIcom\&.wombat\&.fruitbat\&.Brickbat\fR内ではアサーションを無効にしたうえで、プログラムを実行するには、次のようなコマンドを使用します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. \-da:com\&.wombat\&.fruitbat\&.Brickbat <Main Class>
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
\fI\-disableassertions\fRおよび\fI\-da\fRスイッチは、すべてのクラス・ローダーおよびシステム・クラスに適用されます。システム・クラスにはクラス・ローダーはありません。ただし、このルールには1つ例外があります。それは、引数なしの形式でこのスイッチを指定すると、その指定がシステムに適用されない、ということです。この例外を利用すれば、システム・クラスを除くすべてのクラスでアサーションを簡単に有効にすることができます。\fI\-disablesystemassertions\fRオプションは、すべてのシステム・クラスでアサーションを有効にする別のスイッチを提供します。
|
||||
.RE
|
||||
.PP
|
||||
\-enableassertions[:\fIpackage name\fR"\&.\&.\&." | :\fIclass name\fR ], \-ea[:\fIpackage name\fR"\&.\&.\&." | :\fIclass name\fR ]
|
||||
.RS 4
|
||||
アサーションを有効にします。アサーションは、デフォルトでは無効になっています。
|
||||
.sp
|
||||
引数なしの\fIenableassertions\fRまたは\fI\-ea\fRを指定すると、アサーションが有効になります。「\fI\&.\&.\&.\fR」で終わる引数を1つ指定すると、指定したパッケージとそのサブパッケージ内でアサーションが有効になります。引数として\fI"\&.\&.\&."\fRを指定すると、現在の作業ディレクトリにある名前のないパッケージ内でアサーションが有効になります。「\fI\&.\&.\&.\fR」で終わらない引数を1つ指定すると、指定したクラス内でアサーションが有効になります。
|
||||
.sp
|
||||
単一コマンドにこれらのスイッチのインスタンスを複数指定した場合は、指定したスイッチが順番に処理されてからクラスがロードされます。したがって、たとえば、パッケージcom\&.wombat\&.fruitbat(サブパッケージを含む)内でのみアサーションを有効にしてプログラムを実行するには、次のようなコマンドを使用します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-ea:com\&.wombat\&.fruitbat\&.\&.\&. <Main Class>
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
\fI\-enableassertions\fRおよび\fI\-ea\fRスイッチは、すべてのクラス・ローダーおよびシステム・クラスに適用されます。システム・クラスにはクラス・ローダーはありません。ただし、このルールには1つ例外があります。それは、引数なしの形式でこのスイッチを指定すると、その指定がシステムに適用されない、ということです。この例外を利用すれば、システム・クラスを除くすべてのクラスでアサーションを簡単に有効にすることができます。\fI\-enablesystemassertions\fRオプションは、すべてのシステム・クラスでアサーションを有効にする別のスイッチを提供します。
|
||||
.RE
|
||||
.PP
|
||||
\-enablesystemassertions, \-esa
|
||||
.RS 4
|
||||
すべてのシステム・クラス内でアサーションを有効にします。つまり、システム・クラスについてアサーションのデフォルト・ステータスをtrueに設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-disablesystemassertions, \-dsa
|
||||
.RS 4
|
||||
すべてのシステム・クラス内でアサーションを無効にします。
|
||||
.RE
|
||||
.PP
|
||||
\-helpまたは\-?
|
||||
.RS 4
|
||||
使用方法を表示して終了します。
|
||||
.RE
|
||||
.PP
|
||||
\-jar
|
||||
.RS 4
|
||||
JARファイルにカプセル化されたプログラムを実行します。最初の引数は、起動クラスの名前ではなく、JARファイルの名前にします。このオプションが機能するには、JARファイルのマニフェストに\fIMain\-Class\fR:
|
||||
\fIclassname\fRという形式の行を指定する必要があります。\fIclassname\fRには、アプリケーションの開始位置として機能する\fIpublic static void main(String[] args)\fRメソッドを含むクラスを指定します。
|
||||
.sp
|
||||
このオプションを使用すると、指定したJARファイルがすべてのユーザー・クラスのソースになり、ユーザー・クラス・パスの他の設定は無視されます。
|
||||
.sp
|
||||
\fIjava \-jar\fRオプションで実行できるJARファイルは、実行権限のセットを保持しています。このため、\fIjava \-jar\fRを使用しないで実行することも可能です。次の「JARファイルの概要」を参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guides/jar/jarGuide\&.html
|
||||
.RE
|
||||
.PP
|
||||
\-javaagent:\fIjarpath\fR[\fI=options\fR]
|
||||
.RS 4
|
||||
Javaプログラミング言語エージェントをロードします。
|
||||
.RE
|
||||
.PP
|
||||
\-jre\-restrict\-search
|
||||
.RS 4
|
||||
ユーザー・プライベートなJREをバージョン検索に含めます。
|
||||
.RE
|
||||
.PP
|
||||
\-no\-jre\-restrict\-search
|
||||
.RS 4
|
||||
ユーザー・プライベートなJREをバージョン検索から除外します。
|
||||
.RE
|
||||
.PP
|
||||
\-showversion
|
||||
.RS 4
|
||||
バージョン情報を表示して続行します。(も参照してください。)
|
||||
.RE
|
||||
.PP
|
||||
\-splash:\fIimagepath\fR
|
||||
.RS 4
|
||||
\fIimagepath\fRに指定された画像を含むスプラッシュ画面を表示します。
|
||||
.RE
|
||||
.PP
|
||||
\-verbose, \-verbose:class
|
||||
.RS 4
|
||||
クラスがロードされるたびにクラスに関する情報を表示します。
|
||||
.RE
|
||||
.PP
|
||||
\-verbose:gc
|
||||
.RS 4
|
||||
ガベージ・コレクション・イベントが発生するたびに報告します。
|
||||
.RE
|
||||
.PP
|
||||
\-verbose:jni
|
||||
.RS 4
|
||||
ネイティブ・メソッドの使用およびその他のJava Native Interfaceアクティビティに関する情報を報告します。
|
||||
.RE
|
||||
.PP
|
||||
\-version
|
||||
.RS 4
|
||||
バージョン情報を表示して終了します。\fI\-showversion\fRオプションも参照してください。
|
||||
.RE
|
||||
.PP
|
||||
\-version:\fIrelease\fR
|
||||
.RS 4
|
||||
コマンドラインに指定されたクラスまたはJARファイルが、releaseで指定されたバージョンを必要としていることを示します。コールされた\fIjava\fRコマンドのバージョンがこの指定内容を満たさず、かつ適切な実装がシステム上で見つかった場合には、その適切な実装が使用されます。
|
||||
.sp
|
||||
\fIrelease\fRオプションでは、特定のバージョンと、バージョン文字列と呼ばれるバージョンのリストを指定します。バージョン文字列は、いくつかのバージョン範囲を空白で区切った形式の順序付きリストです。バージョン範囲は、\fIバージョンID\fR、\fIバージョンID\fRとそれに続くアスタリスク(\fI*\fR)、\fIバージョンID\fRとそれに続くプラス記号(\fI+\fR)、またはアンパサンド(\fI&\fR)を使用して結合された2つの\fIバージョンID\fRから構成されるバージョン範囲です。次の例のように、アスタリスクはプレフィックス一致を、プラス記号は指定されたバージョン以上を、アンパサンドは2つのバージョン範囲の論理\fIand\fRをそれぞれ意味します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-version:"1\&.6\&.0_13 1\&.6* & 1\&.6\&.0_10+"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
前の例の意味は、バージョン1\&.6\&.0_13、または1\&.6を\fIバージョンID\fRプレフィックスに持つ1\&.6\&.0_10以上のバージョンをクラスまたはJARファイルが必要としている、ということです。バージョン文字列の厳密な構文や定義については、「Javaネットワーク起動プロトコル & API仕様(JSR\-56)」の「付録A」を参照してください。
|
||||
.sp
|
||||
JARファイルの場合は、バージョン要件をコマンドラインに指定するよりも、JARファイルのマニフェスト内に指定することが推奨されています。
|
||||
.sp
|
||||
このオプションの使用に関する重要なポリシー情報は、注意を参照してください。
|
||||
.RE
|
||||
.SS "非標準オプション"
|
||||
.PP
|
||||
\-X
|
||||
.RS 4
|
||||
非標準オプションに関する情報を表示して終了します。
|
||||
.RE
|
||||
.PP
|
||||
\-Xint
|
||||
.RS 4
|
||||
インタプリタ専用モードで動作します。ネイティブ・コードへのコンパイルは無効になり、すべてのバイトコードがインタプリタによって実行されます。Java HotSpot VMクライアントに対応するコンパイラが提供するパフォーマンス上の利点は、このモードでは実現されません。
|
||||
.RE
|
||||
.PP
|
||||
\-Xbatch
|
||||
.RS 4
|
||||
バックグラウンド・コンパイルを無効にします。通常、Java VMでは、バックグラウンド・コンパイルが終了するまで、メソッドをバックグラウンド・タスクとしてコンパイルし、インタプリタ・モードでメソッドを実行します。\-Xbatchフラグを指定すると、バックグラウンド・コンパイルが無効になり、すべてのメソッドのコンパイルが完了するまでフォアグラウンド・タスクとして処理されます。
|
||||
.RE
|
||||
.PP
|
||||
\-X\fIbootclasspath\fR:\fIbootclasspath\fR
|
||||
.RS 4
|
||||
\fIブート・クラス・ファイルを検索するディレクトリ、JARファイルおよびZIPアーカイブのコロンで区切られたリストを指定します。\fR指定したパスに存在するブート・クラス・ファイルが、JavaプラットフォームJDKに含まれるブート・クラス・ファイルのかわりに使用されます。
|
||||
.sp
|
||||
rt\&.jar内のクラスをオーバーライドする目的でこのオプションを使用するアプリケーションは、システムに配置しないでください。Java Runtime Environmentバイナリ・コード・ライセンス違反になります。
|
||||
.RE
|
||||
.PP
|
||||
\-X\fIbootclasspath\fR/a:\fIpath\fR
|
||||
.RS 4
|
||||
ディレクトリ、JARファイルおよびZIPアーカイブのパスをコロンで区切って指定します。パスはデフォルトのブートストラップ・クラス・パスの後に追加されます。
|
||||
.RE
|
||||
.PP
|
||||
\-X\fIbootclasspath\fR/p:\fIpath\fR
|
||||
.RS 4
|
||||
ディレクトリ、JARファイルおよびZIPアーカイブのパスをコロンで区切って指定します。パスはデフォルトのブートストラップ・クラス・パスの前に追加されます。
|
||||
.sp
|
||||
rt\&.jar内のクラスをオーバーライドする目的で、このオプションを使用するアプリケーションをデプロイしないでください。Java Runtime Environmentバイナリ・コード・ライセンスに違反します。
|
||||
.RE
|
||||
.PP
|
||||
\-Xcheck:jni
|
||||
.RS 4
|
||||
Java Native Interface (JNI)機能に対して追加チェックを行います。具体的には、Java仮想マシンはJNIリクエストを処理する前に、JNI関数に渡されるパラメータと、実行環境のデータを検証します。無効なデータが見つかった場合は、ネイティブ・コードに問題があることを示しているため、Java仮想マシンは致命的エラーを発生して終了します。このオプションを使用すると、パフォーマンス低下が予想されます。
|
||||
.RE
|
||||
.PP
|
||||
\-Xfuture
|
||||
.RS 4
|
||||
クラスとファイルの形式を厳密にチェックします。下位互換性を保つため、SDK仮想マシンが実行するデフォルトの形式チェックは、JDKソフトウェアのバージョン1\&.1\&.xが実行するチェックと同程度の厳密さになっています。\fI\-Xfuture\fRオプションを指定すると、クラス・ファイル形式の仕様への準拠を強化するためのより厳密なチェックが有効になります。Javaアプリケーション起動ツールの将来のリリースでは、より厳密なチェックがデフォルトになるため、新しいコードを開発するときにはこのフラグを使用することをお薦めします。
|
||||
.RE
|
||||
.PP
|
||||
\-Xnoclassgc
|
||||
.RS 4
|
||||
クラスのガベージ・コレクションを無効にします。このオプションを使用すると、ロード済クラスからメモリーが回復されることがなくなるため、全体的なメモリー使用量が増大します。この場合、アプリケーションによっては\fIOutOfMemoryError\fRがスローされる可能性があります。
|
||||
.RE
|
||||
.PP
|
||||
\-Xincgc
|
||||
.RS 4
|
||||
インクリメンタル・ガベージ・コレクタを有効にします。インクリメンタル・ガベージ・コレクタは、デフォルトでは無効になっています。有効にすると、プログラムの実行中にガベージ・コレクションによる一時停止が発生しなくなります。インクリメンタル・ガベージ・コレクタは、プログラムと同時に実行することがあり、この場合、プログラムの利用できるプロセッサ能力が低下します。
|
||||
.RE
|
||||
.PP
|
||||
\-Xloggc:\fIfile\fR
|
||||
.RS 4
|
||||
\fI\-verbose:gc\fRと同様にガベージ・コレクション・イベントが発生するたびに報告しますが、そのデータをファイルに記録します。\fI\-verbose:gc\fRを指定したときに報告される情報の他に、報告される各イベントの先頭に、最初のガベージ・コレクション・イベントからの経過時間(秒単位)が付け加えられます。
|
||||
.sp
|
||||
ネットワークのレスポンス時間によってJava VMの実行速度が低下するのを避けるため、このファイルの格納先は、常にローカル・ファイル・システムにしてください。ファイル・システムが満杯になると、ファイルは切り詰められ、そのファイルにデータが引続き記録されます。このオプションと\fI\-verbose:gc\fRの両方がコマンドラインに指定されている場合は、このオプションが優先されます。
|
||||
.RE
|
||||
.PP
|
||||
\-Xmnsizeまたは\-XX:\fINewSize\fR
|
||||
.RS 4
|
||||
若い世代(ナーサリ)のサイズを設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-Xms\fIn\fR
|
||||
.RS 4
|
||||
メモリー割当てプールの初期サイズをバイト数で指定します。指定する値は、1MBより大きい1024の倍数にする必要があります。キロバイトを指定するには、文字\fIk\fRまたは\fIK\fRを付けます。メガバイトを指定するには、文字\fIm\fRまたは\fIM\fRを付けます。デフォルト値は、実行時にシステム構成に基づいて選択されます。次の\fI「ガベージ・コレクタのエルゴノミクス」\fRを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guide/vm/gc\-ergonomics\&.html
|
||||
.sp
|
||||
例:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-Xms6291456
|
||||
\-Xms6144k
|
||||
\-Xms6m
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-Xmx\fIn\fR
|
||||
.RS 4
|
||||
メモリー割当てプールの最大サイズをバイト数で指定します。指定する値は、2MBより大きい1024の倍数にする必要があります。キロバイトを指定するには、文字\fIk\fRまたは\fIK\fRを付けます。メガバイトを指定するには、文字\fIm\fRまたは\fIM\fRを付けます。デフォルト値は、実行時にシステム構成に基づいて選択されます。
|
||||
.sp
|
||||
サーバー・デプロイメントでは、\fI\-Xms\fRおよび\fI\-Xmx\fRは通常同じ値に設定されます。次の\fI「ガベージ・コレクタのエルゴノミクス」\fRを参照してください:
|
||||
|
||||
http://docs\&.oracle\&.com/javase/7/docs/technotes/guide/vm/gc\-ergonomics\&.html
|
||||
.sp
|
||||
例:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-Xmx83886080
|
||||
\-Xmx81920k
|
||||
\-Xmx80m
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
Solaris 7およびSolaris 8 SPARCプラットフォームの場合のこの値の上限は、およそ4000mからオーバーヘッドの量を引いたものです。Solaris 2\&.6およびx86プラットフォームの場合の上限は、およそ2000mからオーバーヘッドの量を引いたものです。Linuxプラットフォームの場合の上限は、およそ2000mからオーバーヘッドの量を引いたものです。
|
||||
.RE
|
||||
.PP
|
||||
\-Xprof
|
||||
.RS 4
|
||||
実行中のプログラムのプロファイルを生成し、プロファイル・データを標準出力に出力します。このオプションは、プログラム開発用のユーティリティとして提供されています。本番稼働システムでの使用を目的としたものではありません。
|
||||
.RE
|
||||
.PP
|
||||
\-Xrs
|
||||
.RS 4
|
||||
Java VMによるオペレーティング・システム・シグナルの使用を減らします。
|
||||
.sp
|
||||
以前のリリースでは、Javaアプリケーションを秩序正しくシャットダウンするためのシャットダウン・フック機能が追加されました。この機能により、Java VMが突然終了した場合でも、シャットダウン時にユーザー・クリーン・アップコード(データベース接続のクローズなど)を実行できるようになりました。
|
||||
.sp
|
||||
Java VMは、予期しないJava VM終了のシャットダウン・フックを実装するためにシグナルをキャッチします。Java VMは、\fISIGHUP\fR、\fISIGINT\fRおよび\fISIGTERM\fRを使用してシャットダウン・フックの実行を開始します。
|
||||
.sp
|
||||
JVMは、デバッグの目的でスレッド・スタックをダンプするという機能を実現するために、同様のメカニズムを使用します。JVMは、スレッド・ダンプを実行するために\fISIGQUIT\fRを使用します。
|
||||
.sp
|
||||
Java VMを埋め込んでいるアプリケーションは\fISIGINT\fRや\fISIGTERM\fRなどのシグナルを頻繁にトラップする必要があり、その結果Java VMのシグナル・ハンドラと衝突する可能性があります。\fI\-Xrs\fRコマンドライン・オプションを使用すると、この問題に対処できます。\fI\-Xrs\fRがJava VMで使用されている場合、\fISIGINT\fR、\fISIGTERM\fR、\fISIGHUP\fRおよび\fISIGQUIT\fRのシグナル・マスクはJava VMによって変更されず、これらのシグナルのシグナル・ハンドラはインストールされません。
|
||||
.sp
|
||||
\fI\-Xrs\fRを指定すると、次の2つの結果が生じます:
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fISIGQUIT\fRによるスレッド・ダンプは使用できません。
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
シャットダウン・フック処理の実行は、Java VMが終了しようとしている時点で\fISystem\&.exit()\fRを呼び出すなどして、ユーザー・コード側で行う必要があります。
|
||||
.RE
|
||||
.RE
|
||||
.PP
|
||||
\-Xss\fIn\fR
|
||||
.RS 4
|
||||
スレッドのスタック・サイズを設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:AllocationPrefetchStyle=\fIn\fR
|
||||
.RS 4
|
||||
割当中に使用されるプリフェッチのスタイルを設定します。デフォルトは2です。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+AggressiveOpts
|
||||
.RS 4
|
||||
積極的な最適化を有効にします。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+|\-DisableAttachMechanism
|
||||
.RS 4
|
||||
コマンド(\fIjmap\fRや\fIjconsole\fRなど)がJava VMに接続できるかどうかを指定します。デフォルトでは、この機能は無効になっています。つまり、次の例のように接続が有効です。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-XX:+DisableAttachMechanism
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+|\-FlightRecorder
|
||||
.RS 4
|
||||
アプリケーションの実行中に、Javaフライト・レコーダ(JFR)の使用を切り替えます。これは商用機能で、\fI\-XX:+UnlockCommercialFeatures\fRオプションを次のように指定することも必要になります。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-XX:UnlockCommercialFeatures \-XX:+FlightRecorder
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XX:FlightRecorderOptions=\fIparameter\fR=\fIvalue\fR
|
||||
.RS 4
|
||||
JFRの動作を制御するパラメータを設定します。このオプションを使用できるのは、JFRが有効な場合(\fI\-XX:+FlightRecorder\fRオプションが指定されている場合)のみです。
|
||||
.sp
|
||||
次のリストには、使用可能なすべてのJFRパラメータが含まれます。
|
||||
.PP
|
||||
defaultrecording=true|false
|
||||
.RS 4
|
||||
バックグラウンド記録が有効かどうかを指定します。デフォルトでは、このパラメータは\fIfalse\fR
|
||||
(バックグラウンド記録は無効)に設定されています。有効にするには、パラメータを\fItrue\fRに設定します。
|
||||
.RE
|
||||
.PP
|
||||
disk=true|false
|
||||
.RS 4
|
||||
JFRでディスクに連続記録を書き込む必要があるかどうかを指定します。デフォルトでは、このパラメータは\fIfalse\fR
|
||||
(ディスクへの連続記録は無効)に設定されています。有効にするには、パラメータを\fItrue\fRに設定します。
|
||||
.RE
|
||||
.PP
|
||||
dumponexit=true|false
|
||||
.RS 4
|
||||
JVMが制御された方式で終了したときに、JFRデータのダンプ・ファイルを生成するかどうかを指定します。デフォルトでは、このパラメータは\fIfalse\fR
|
||||
(終了時にダンプ・ファイルは生成されない)に設定されています。有効にするには、パラメータを\fItrue\fRに設定します。
|
||||
.sp
|
||||
ダンプ・ファイルは、\fIdumponexitpath\fRパラメータによって指定された場所に書き込まれます。
|
||||
.RE
|
||||
.PP
|
||||
dumponexitpath=\fIpath\fR
|
||||
.RS 4
|
||||
\fIdumponexit=true\fRパラメータが設定されている場合に、JVMが制御された方式で終了するときに作成される、JFRデータを含むダンプ・ファイルのパスと名前を指定します。指定したパスがディレクトリの場合、JVMは作成日時を示すファイル名を割り当てます。指定したパスにすでに存在するファイルのファイル名が含まれる場合、指定したファイル名に日付およびタイム・スタンプを追加して新しいファイルが作成されます。
|
||||
.RE
|
||||
.PP
|
||||
globalbuffersize=\fIsize\fR
|
||||
.RS 4
|
||||
データ保存に使用する総プライマリ・メモリー量(MB単位)を指定します。デフォルトでは、サイズは10MBに設定されています。
|
||||
.RE
|
||||
.PP
|
||||
maxage=\fItime\fR
|
||||
.RS 4
|
||||
デフォルト記録のディスク・データの最大保持時間(分単位)を指定します。デフォルトでは、最大保持時間は15分に設定されています。このパラメータは、\fIdisk=true\fRパラメータが設定されている場合のみ有効です。
|
||||
.RE
|
||||
.PP
|
||||
maxchunksize=\fIsize\fR
|
||||
.RS 4
|
||||
記録内のデータ・チャンクの最大サイズ(MB単位)を指定します。デフォルトでは、データ・チャンクの最大サイズは12MBに設定されています。
|
||||
.RE
|
||||
.PP
|
||||
maxsize=\fIsize\fR
|
||||
.RS 4
|
||||
デフォルト記録のディスク・データの最大サイズ(MB単位)を指定します。デフォルトでは、ディスク・データの最大サイズは制限されていません。
|
||||
.sp
|
||||
このパラメータは、\fIdisk=true\fRパラメータが設定されている場合にのみ有効です。
|
||||
.RE
|
||||
.PP
|
||||
repository=\fIpath\fR
|
||||
.RS 4
|
||||
一時ディスク記憶域のリポジトリ(ディレクトリ)を指定します。デフォルトでは、システムの一時ディレクトリが使用されます。
|
||||
.RE
|
||||
.PP
|
||||
settings=\fIpath\fR
|
||||
.RS 4
|
||||
イベント設定ファイル(タイプはJFS)のパスと名前を指定します。デフォルトでは、\fIJAVA_HOME/jre/lib/jfr\fRにある\fIdefault\&.jfs\fRファイルが使用されます。
|
||||
.RE
|
||||
.PP
|
||||
threadbuffersize=\fIsize\fR
|
||||
.RS 4
|
||||
スレッドごとのローカル・バッファ・サイズ(KB単位)を指定します。このパラメータの値が高いと、競合することなく、より多くのデータを収集してグローバル記憶域にフラッシュすることができます。スレッドが多い環境ではアプリケーションのフットプリントも増加します。デフォルトでは、ローカル・バッファ・サイズは5KBに設定されています。
|
||||
.RE
|
||||
.sp
|
||||
カンマで区切って、複数のパラメータの値を指定できます。たとえば、ディスクに連続記録を書き込み、データ・チャンクの最大サイズを10MBに設定するようにJFRに指示するには、次のように指定します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-XX:FlightRecorderOptions=disk=true,maxchunksize=10M
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XXLargePageSizeInBytes=\fIn\fR
|
||||
.RS 4
|
||||
ラージ・ページの最大サイズを指定します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:MaxGCPauseMillis=\fIn\fR
|
||||
.RS 4
|
||||
最大GC休止時間のターゲットを設定します。
|
||||
.sp
|
||||
これはソフト・ゴールのため、Java VMは実現のために最善の努力をします。デフォルトで設定されている最大値はありません。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:NewSize
|
||||
.RS 4
|
||||
若い世代(ナーサリ)のサイズを設定します。\fI\-Xmnsize\fRと同じです。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:ParallelGCThreads=\fIn\fR
|
||||
.RS 4
|
||||
パラレル・コレクタ内のGCスレッドの数を設定します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:PredictedClassLoadCount=\fIn\fR
|
||||
.RS 4
|
||||
このオプションでは、最初に\fIUnlockExperimentalVMOptions\fRフラグを設定する必要があります。アプリケーションが多数のクラスをロードする場合で、特に\fIclass\&.forName()\fRが頻繁に使用される場合は\fIPredictedClassLoadCount\fRフラグを使用します。推奨値は、\fI\-verbose:class\fRからの出力に示されているロード済クラスの数です。
|
||||
.sp
|
||||
例:
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-XX:+UnlockExperimentalVMOptions \-XX:PredictedClassLoadCount=60013
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+PrintCompilation
|
||||
.RS 4
|
||||
Java HotSpot VMダイナミック・ランタイム・コンパイラからの詳細出力を印刷します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+PrintGCDetails \-XX:+PrintGCTimeStamps
|
||||
.RS 4
|
||||
ガベージ・コレクション出力をタイムスタンプとともに印刷します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:SoftRefLRUPolicyMSPerMB=0
|
||||
.RS 4
|
||||
このフラグは、ソフトウェア参照の積極的処理を有効にします。このフラグは、ソフトウェア参照カウントがJava HotSpot VMガベージ・コレクタに影響する場合に使用します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:StartFlightRecording=\fIparameter\fR=\fIvalue\fR
|
||||
.RS 4
|
||||
JavaアプリケーションのJFR記録を開始します。このオプションは、実行時にJFRを起動する\fIstart_flightrecording\fR診断コマンドに相当します。JFR記録の開始時に、次のパラメータを設定できます。
|
||||
.PP
|
||||
compress=true|false
|
||||
.RS 4
|
||||
\fIgzip\fRファイル圧縮ユーティリティを使用して、ディスクでJFR記録ログ・ファイル(タイプはJFR)を圧縮するかどうかを指定します。このパラメータは、\fIfilename\fRパラメータが指定されている場合のみ有効です。デフォルトでは、\fIfalse\fR
|
||||
(記録を圧縮しない)に設定されています。圧縮を有効にするには、パラメータを\fItrue\fRに設定します。
|
||||
.RE
|
||||
.PP
|
||||
defaultrecording=true|false
|
||||
.RS 4
|
||||
記録が連続的か、または限定された時間に対して実行されるかを指定します。デフォルトでは、このパラメータは\fIfalse\fR
|
||||
(記録は限定された時間に対して実行される)に設定されています。記録を連続的に実行するには、パラメータを\fItrue\fRに設定します。
|
||||
.RE
|
||||
.PP
|
||||
delay=\fItime\fR
|
||||
.RS 4
|
||||
Javaアプリケーションの起動時間と記録開始との間の遅延(ミリ秒単位)を指定します。デフォルトでは、遅延は存在せず、このパラメータは0に設定されています。
|
||||
.RE
|
||||
.PP
|
||||
duration=\fItime\fR
|
||||
.RS 4
|
||||
記録の期間(ミリ秒単位)を指定します。デフォルトでは、期間は制限されていません。
|
||||
.RE
|
||||
.PP
|
||||
filename=\fIpath\fR
|
||||
.RS 4
|
||||
JFR記録ログ・ファイルのパスと名前を指定します。
|
||||
.RE
|
||||
.PP
|
||||
name=\fIidentifier\fR
|
||||
.RS 4
|
||||
JFR記録の識別子を指定します。デフォルトでは、Recording xに設定されています
|
||||
.RE
|
||||
.PP
|
||||
maxage=\fItime\fR
|
||||
.RS 4
|
||||
デフォルト記録のディスク・データの最大保持時間(分単位)を指定します。デフォルトでは、最大保持時間は15分に設定されています。
|
||||
.RE
|
||||
.PP
|
||||
maxsize=\fIsize\fR
|
||||
.RS 4
|
||||
スレッド・バッファからグローバル・バッファにフラッシュされるまでの、記録の最大サイズ(MB単位)を指定します。デフォルトでは、最大サイズは制限されていません。
|
||||
.sp
|
||||
このパラメータは、サイズが制限された記録の場合のみ有効です。
|
||||
.RE
|
||||
.PP
|
||||
settings=\fIpath\fR
|
||||
.RS 4
|
||||
イベント設定ファイル(タイプはJFS)のパスと名前を指定します。デフォルトでは、\fIJAVA_HOME/jre/lib/jfr\fRにある\fIdefault\&.jfs\fRファイルが使用されます。
|
||||
.RE
|
||||
.sp
|
||||
カンマで区切って、複数のパラメータの値を指定できます。たとえば、記録を現在の作業ディレクトリのtest\&.jfrに保存し、ログ・ファイルを圧縮するようJFRに指示するには、次のように指定します。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
\-XX:StartFlightRecording=filename=test\&.jfr,compress=true
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\-XX:TLABSize=\fIn\fR
|
||||
.RS 4
|
||||
スレッド・ローカル割当てバッファ(TLAB)がJava HotSpot VMでデフォルトで有効になっています。Java HotSpot VMでは、TLABのサイズを割当てパターンに基づいて決定します。\fI\-XX:TLABSize\fRオプションでTLABのサイズを微調整できます。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+UnlockCommercialFeatures
|
||||
.RS 4
|
||||
このフラグは、商用機能の使用を能動的にロック解除する場合に使用します。商用機能とは、「Java SE Products」Webページで規定されているとおり、Oracle Java SE Advanced製品またはOracle Java SE Suite製品です。
|
||||
.sp
|
||||
このフラグが指定されていない場合、デフォルトはJava仮想マシンを使用可能な商用機能なしで実行することです。それらを有効にした後、実行時にそれらの使用を無効にすることはできません。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+UseAltSigs
|
||||
.RS 4
|
||||
Java VMではデフォルトで\fISIGUSR1\fRおよび\fISIGUSR2\fRを使用しますが、\fISIGUSR1\fRおよび\fISIGUSR2\fRをシグナル連鎖するアプリケーションと競合する場合があります。\fI\-XX:+UseAltSigs\fRオプションを指定すると、Java VMはデフォルトとして\fISIGUSR1\fRと\fISIGUSR2\fR以外のシグナルを使用します。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+|\-UseCompressedOops
|
||||
.RS 4
|
||||
64ビットJava VMで圧縮された参照を有効にします。
|
||||
.sp
|
||||
このオプションは、デフォルトでtrueになります。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+UseConcMarkSweepGCまたは\-XX:+UseG1GC
|
||||
.RS 4
|
||||
Concurrent Mark Sweep (CMS)またはG1ガベージ・コレクションを有効にします。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+|\-UseLargePages
|
||||
.RS 4
|
||||
ラージ・ページ・サポートを有効にします。
|
||||
.sp
|
||||
ラージ・ページは、Solarisではデフォルトで有効になっています。
|
||||
.RE
|
||||
.PP
|
||||
\-XX:+UseParallelOldGC
|
||||
.RS 4
|
||||
パラレル・ガベージ・コレクタを有効にします。これはスループットおよび平均レスポンス時間に対して最適化されます。
|
||||
.RE
|
||||
.SH "注意"
|
||||
.PP
|
||||
\fI\-version:release\fRオプションでは、リリース指定の複雑さに制限はありません。ただし、可能なリリース指定の限られたサブセットのみが適切なサウンド・ポリシーを表現でき、それらのみが完全にサポートされます。それらのポリシーを次に示します。
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04' 1.\h'+01'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP " 1." 4.2
|
||||
.\}
|
||||
任意のバージョン。これは、このオプションを使用しないことで表現できます。
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04' 2.\h'+01'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP " 2." 4.2
|
||||
.\}
|
||||
次の例のように、ある特定の\fIバージョンID\fR値よりも大きい任意のバージョン。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
"1\&.6\&.0_10+"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
この場合、1\&.6\&.0_10よりも大きい任意のバージョンが使用されます。これは、指定されたバージョンで特定のインタフェースが導入された(あるいはそのバグが修正された)場合に便利です。
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04' 3.\h'+01'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP " 3." 4.2
|
||||
.\}
|
||||
次の例のように、ある特定のバージョンIDよりも大きいバージョンで、そのリリース・ファミリの上限によって制限されるもの。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
"1\&.6\&.0_10+ & 1\&.6*"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04' 4.\h'+01'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP " 4." 4.2
|
||||
.\}
|
||||
次の例のように、項目2または3の\fIor\fR式。
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
"1\&.6\&.0_10+ & 1\&.6* 1\&.7+"
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
項目2と同様です。これは、ある変更が特定のリリース(1\&.7)で導入されたが、その同じ変更が以前のリリースのアップデートでも利用可能になった、という場合に便利です。
|
||||
.RE
|
||||
.SH "パフォーマンス・チューニングの例"
|
||||
.PP
|
||||
スループットまたはレスポンス時間の高速化のどちらかを最適化するための、試験的なチューニング・フラグの使用例を次に示します。
|
||||
.PP
|
||||
\fBExample 1\fR, スループットを向上するためのチューニング
|
||||
.RS 4
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-d64 \-server \-XX:+AggressiveOpts \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.PP
|
||||
\fBExample 2\fR, レスポンス時間を速くするためのチューニング
|
||||
.RS 4
|
||||
.sp
|
||||
.if n \{\
|
||||
.RS 4
|
||||
.\}
|
||||
.nf
|
||||
java \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamps
|
||||
.fi
|
||||
.if n \{\
|
||||
.RE
|
||||
.\}
|
||||
.RE
|
||||
.SH "終了ステータス"
|
||||
.PP
|
||||
一般に、次の終了値が起動ツールから返されるのは通常、起動元が不正な引数で呼び出されたか、深刻なエラーが発生したか、あるいはJava仮想マシンから例外がスローされた場合です。ただしJavaアプリケーションは、API呼出し\fISystem\&.exit(exitValue)\fRを使用して任意の値を返すことを選択することもできます。
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fI0\fR: 正常終了
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
\fI>0\fR: エラー発生
|
||||
.RE
|
||||
.SH "関連項目"
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
javac [SolarisおよびLinux] [Windows]
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
jdb [SolarisおよびLinux] [Windows]
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
javah [SolarisおよびLinux] [Windows]
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
jar [SolarisおよびLinux] [Windows]
|
||||
.RE
|
||||
.br
|
||||
'pl 8.5i
|
||||
'bp
|
||||
@@ -0,0 +1,203 @@
|
||||
." Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH javaws 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
\f2javaws\fPコマンドライン
|
||||
.LP
|
||||
.SH "名前"
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws\fP \- Java Web Start起動コマンド
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws [run\-options] <jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws [control\-options]\fP
|
||||
.LP
|
||||
.SH "パラメータ"
|
||||
.LP
|
||||
.LP
|
||||
\f2[run\-options]\fP
|
||||
.LP
|
||||
.LP
|
||||
コマンドライン実行オプション。実行オプションは任意の順序で指定できます。各種実行オプションの詳細は、次の実行オプションを参照してください。
|
||||
.LP
|
||||
.LP
|
||||
\f2<jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
JNLP(Java Network Launching Protocol)ファイルのパスまたはURL(Uniform Resource Locator)のどちらかを指定できます。
|
||||
.LP
|
||||
.LP
|
||||
\f2[control\-options]\fP
|
||||
.LP
|
||||
.LP
|
||||
コマンドライン制御オプション。制御オプションは任意の順序で指定できます。各種制御オプションの詳細は、次の制御オプションを参照してください。
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws\fPコマンドは、JNLP(Java Network Launching Protocol)のリファレンス実装であるJava Web Startを起動します。Java Web Startは、ネットワーク上で動作するJavaアプリケーションまたはアプレットを起動します。
|
||||
.LP
|
||||
.LP
|
||||
JNLPファイルが指定された場合、\f2javaws\fPは、そのJNLPファイルで指定されたJavaアプリケーション/アプレットを起動します。
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws\fP起動ツールには、現在のリリースでサポートされている1組のオプションがあります。ただし、これらのオプションは将来のリリースでは削除される可能性があります。
|
||||
.LP
|
||||
.SH "実行オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f2\-offline\fP
|
||||
.LP
|
||||
.LP
|
||||
Java Web Startをオフライン・モードで実行します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-Xnosplash\fP
|
||||
.LP
|
||||
.LP
|
||||
初期スプラッシュ画面を表示しません。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-open <arguments>\fP
|
||||
.LP
|
||||
.LP
|
||||
このオプションを指定すると、JNLPファイル内の引数が\f2\-open<arguments>\fPに置き換わります。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-print <arguments>\fP
|
||||
.LP
|
||||
.LP
|
||||
このオプションを指定すると、JNLPファイル内の引数が\f2\-print<arguments>\fPに置き換わります。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-online\fP
|
||||
.LP
|
||||
.LP
|
||||
オンライン・モードを使用します(デフォルトの動作)。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-wait\fP
|
||||
.LP
|
||||
.LP
|
||||
このオプションを指定した場合、\f2javaws\fPプロセスは、アプリケーションが終了するまで終了しません。Windowsプラットフォーム上では、このオプションは説明したとおりに機能しません。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
追加の出力を表示します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-J<option>\fP
|
||||
.LP
|
||||
.LP
|
||||
VMに対するオプションを指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-system\fP
|
||||
.LP
|
||||
.LP
|
||||
アプリケーションをシステム・キャッシュのみから実行します。
|
||||
.LP
|
||||
.SH "制御オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f2\-viewer\fP
|
||||
.LP
|
||||
.LP
|
||||
Javaコントロール・パネルでキャッシュ・ビューアを表示します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-clearcache\fP
|
||||
.LP
|
||||
.LP
|
||||
インストールされていないすべてのアプリケーションをキャッシュから削除します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-userConfig <property name>\fP
|
||||
.LP
|
||||
.LP
|
||||
指定されたデプロイメント・プロパティをクリアします。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-userConfig <property name> <property value>\fP
|
||||
.LP
|
||||
.LP
|
||||
指定されたデプロイメント・プロパティを指定された値に設定します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-uninstall\fP
|
||||
.LP
|
||||
.LP
|
||||
キャッシュからすべてのアプリケーションを削除します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-uninstall <jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
キャッシュからアプリケーションを削除します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-import [import\-options] <jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
キャッシュにアプリケーションをインポートします。
|
||||
.LP
|
||||
.SH "インポート・オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f2\-silent\fP
|
||||
.LP
|
||||
.LP
|
||||
サイレント・モードでインポートします(ユーザー・インタフェースは表示されません)。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-system\fP
|
||||
.LP
|
||||
.LP
|
||||
システム・キャッシュにアプリケーションをインポートします。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-codebase <url>\fP
|
||||
.LP
|
||||
.LP
|
||||
指定したcodebaseからリソースを取得します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-shortcut\fP
|
||||
.LP
|
||||
.LP
|
||||
ユーザーがプロンプトで許可した場合のようにショートカットをインストールします。このオプションは、\f2\-silent\fPオプションも使用しないと効果がありません。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-association\fP
|
||||
.LP
|
||||
.LP
|
||||
ユーザーがプロンプトで許可した場合のようにアソシエーションをインストールします。このオプションは、\f2\-silent\fPオプションも使用しないと効果がありません。
|
||||
.LP
|
||||
.SH "ファイル"
|
||||
.LP
|
||||
.LP
|
||||
ユーザー・キャッシュ、システム・キャッシュおよびdeployment.propertiesファイルについては、
|
||||
.na
|
||||
\f2システム・レベルおよびユーザー・レベルのプロパティ\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/properties.htmlを参照してください。
|
||||
.LP
|
||||
.SH "詳細情報"
|
||||
.LP
|
||||
.LP
|
||||
Java Web Startの詳細は、
|
||||
.na
|
||||
\f2Java Web Start\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/index.htmlを参照してください。
|
||||
.LP
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,349 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH orbd 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
orbd \- The Object Request Broker Daemon
|
||||
.LP
|
||||
.LP
|
||||
\f3orbd\fPは、CORBA環境のサーバーにある永続オブジェクトをクライアントから透過的に検索して呼び出せるようにするために使用します。
|
||||
.LP
|
||||
.LP
|
||||
\f3関連項目:\fP
|
||||
.na
|
||||
\f2ネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd <\fP\f3options\fP\f3>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f3orbd\fPツールに含まれるサーバー・マネージャを使用すると、クライアントはCORBA環境でサーバー上にある永続オブジェクトを透過的に検索して呼び出すことができます。永続サーバーは、ネーム・サービスに永続オブジェクト参照を発行する際、サーバーのポート番号のかわりにORBDのポート番号をオブジェクト参照に含めます。永続オブジェクト参照のオブジェクト参照にORBDポート番号を含めることには、次のような利点があります。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
ネーム・サービスにあるオブジェクト参照が、サーバーのライフ・サイクルと無関係になります。たとえば、オブジェクト参照は、初めてインストールされたときはネーム・サービスのサーバーによってネーム・サービスに発行されますが、その後は、サーバーの開始またはシャットダウンの回数にかかわらず、呼び出したクライアントにORBDがいつでも正しいオブジェクト参照を返します。
|
||||
.TP 2
|
||||
o
|
||||
クライアントは一度のみネーミング・サービスのオブジェクト参照をルックアップする必要がありますが、その後はサーバーのライフ・サイクルによる変更とは無関係にこの参照を利用することができます。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
ORBDのサーバー・マネージャにアクセスするには、servertool(1)を使用してサーバーを起動する必要があります。servertoolは、アプリケーション・プログラマが、永続サーバーの登録、登録解除、起動およびシャットダウンを行うためのコマンドライン・インタフェースです。サーバー・マネージャの詳細は、このドキュメントの\f2サーバー・マネージャ\fPという項を参照してください。
|
||||
.LP
|
||||
.LP
|
||||
\f2orbd\fPを起動すると、ネーム・サービスも起動されます。ネーム・サービスの詳細は、
|
||||
.na
|
||||
\f2ネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.htmlを参照してください。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.SS
|
||||
必須オプション
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-ORBInitialPort nameserverport
|
||||
ネーム・サーバーを起動するポートの番号を指定します。\f2orbd\fPは、起動されると、このポート上で着信リクエストを待機します。Solarisソフトウェアを使用する場合、1024より小さいポート上でプロセスを開始するには、rootユーザーになる必要があります。このため、1024以上のポート番号を使用することをお薦めします。(必須)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.SS
|
||||
その他のオプション
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-port port
|
||||
ORBDを起動するポートを指定します。このポートで、永続オブジェクトに対するリクエストをORBDが受け取ります。このポートのデフォルト値は1049です。このポート番号は、永続Interoperable Object References(IOR)のポート・フィールドに追加されます。(省略可)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-defaultdb directory
|
||||
ORBD永続格納ディレクトリ\f2orb.db\fPが作成されるベース・ディレクトリを指定します。このオプションが指定されていない場合、デフォルト値は「./orb.db」になります。(省略可)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverPollingTime milliseconds
|
||||
\f2servertool\fPを使用して登録された永続サーバーが正常に動作していることをORBDが確認する回数を指定します。デフォルト値は1,000ミリ秒です。\f2milliseconds\fPに指定する値は、有効な正の整数にする必要があります。(省略可)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverStartupDelay milliseconds
|
||||
\f2servertool\fPを使用して登録された永続サーバーを再起動してから、位置転送の例外を送信するまでのORBDの待機時間を指定します。デフォルト値は1,000ミリ秒です。\f2milliseconds\fPに指定する値は、有効な正の整数にする必要があります。(省略可)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Joption
|
||||
Java仮想マシンに\f2option\fPを渡します。\f2option\fPには、java(1)のリファレンス・ページに記載されているオプションを1つ指定します。たとえば、\f3\-J\-Xms48m\fPと指定すると、スタートアップ・メモリーは48Mバイトに設定されます。\f3\-J\fPを使用して背後の仮想マシンにオプションを渡すことはよく行われています。
|
||||
.TP 3
|
||||
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "ネーム・サービスの起動と停止"
|
||||
.LP
|
||||
.LP
|
||||
ネーム・サービスは、
|
||||
.na
|
||||
\f2CORBAオブジェクト\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20objectにネーミングを可能にするCORBAサービスです。ネーミングは名前をオブジェクト参照にバインドすることにより可能になります。
|
||||
.na
|
||||
\f2ネーム・バインディング\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#name%20bindingをネーム・サービスに格納すれば、クライアントが名前を指定して目的のオブジェクト参照を取得できるようになります。
|
||||
.LP
|
||||
.LP
|
||||
ORBDは、クライアントまたはサーバーを実行する前に起動します。ORBDには、永続ネーム・サービスおよび一時ネーム・サービスが組み込まれています。これらはどちらもCOSネーム・サービスの実装です。
|
||||
.LP
|
||||
.LP
|
||||
\f4永続\fP\f3ネーム・サービス\fPは、ネーミング・コンテキストに対して永続性を提供します。つまり、この情報は、サービスの停止や起動後にも維持され、サービスに障害が発生した場合でも回復できます。ORBDを再起動すると、永続ネーム・サービスはネーミング・コンテキストのグラフを復元し、すべてのクライアントとサーバーの名前のバインディングがそのまま(永続的に)保持されるようにします。
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
下位互換性のため、旧バージョンのJDKに同梱されていた\f4一時\fP\f3ネーム・サービス\fP\f2tnameserv\fPが、今回のリリースのJ2SEにも同梱されています。一時ネーム・サービスでは、ネーム・サービスの実行中にのみネーミング・コンテキストが保持されます。サービスが中断されると、ネーミング・コンテキスト・グラフは失われます。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-ORBInitialPort\fP引数は、\f2orbd\fPの必須のコマンドライン引数で、ネーム・サービスが実行されるポートの番号を設定するために使用されます。次の手順では、Java\ IDL Object Request Broker Daemon用にポート1050を使用できることを前提としています。Solarisソフトウェアを使用する場合、1024より小さいポート上でプロセスを開始するには、rootユーザーになる必要があります。このため、1024以上のポート番号を使用することをお薦めします。必要であれば別のポートに変更してください。
|
||||
.LP
|
||||
.LP
|
||||
UNIXコマンド・シェルで\f2orbd\fPを起動するには、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
WindowsのMS\-DOSシステム・プロンプトでは、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
これでORBDが実行され、サーバーとクライアントのアプリケーションを実行できるようになります。クライアントとサーバーのアプリケーションは、実行時に、ネーム・サービスが実行されているポートの番号(必要な場合はさらにマシン名)を認識している必要があります。これを実現する1つの方法は、次のコードをアプリケーションに追加することです。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
この例では、ネーム・サービスは、ホストMyHostのポート1050上で実行されます。別の方法として、コマンドラインからサーバーまたはクライアントのアプリケーションを実行するときに、ポート番号またはマシン名あるいはその両方を指定する方法もあります。たとえば、次のコマンドライン・オプションを使用して、「HelloApplication」を起動できます。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
ネーム・サービスを停止するには、適切なオペレーティング・システム・コマンドを使用します。たとえば、Solaris上で\f2pkill orbd\fPを実行したり、\f2orbd\fPが動作中のDOSウィンドウで\f2[Ctrl]+[C]\fPキーを押します。一時ネーム・サービスの場合は、サービスが終了されると、ネーム・サービスに登録された名前が消去される場合があります。Java IDLネーム・サービスは、明示的に停止されるまで実行されます。
|
||||
.LP
|
||||
.LP
|
||||
ORBDに含まれるネーム・サービスの詳細は、
|
||||
.na
|
||||
\f2ネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.htmlを参照してください。
|
||||
.LP
|
||||
.SH "サーバー・マネージャ"
|
||||
.LP
|
||||
.LP
|
||||
ORBDのサーバー・マネージャにアクセスして、永続サーバーを実行するには、servertool(1)を使用してサーバーを起動する必要があります。servertoolは、アプリケーション・プログラマが、永続サーバーの登録、登録解除、起動およびシャットダウンを行うためのコマンドライン・インタフェースです。\f2servertool\fPを使用してサーバーを起動する場合は、\f2orbd\fPが実行されている場所と同じポートとホストで起動する必要があります。サーバーを異なるポートで実行すると、ローカル・コンテキスト用にデータベースに保存されている情報が無効になり、サービスが正しく動作しません。
|
||||
.LP
|
||||
.SS
|
||||
サーバー・マネージャ: 例
|
||||
.LP
|
||||
.LP
|
||||
デモ用の
|
||||
.na
|
||||
\f2サンプル・チュートリアル\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlExample.htmlを使用し、チュートリアルの手順に従って、\f2idlj\fPコンパイラと\f2javac\fPコンパイラを実行します。サーバー・マネージャを実行するには、次の手順に従ってアプリケーションを実行します。
|
||||
.LP
|
||||
.LP
|
||||
\f2orbd\fPを起動します。
|
||||
.LP
|
||||
.LP
|
||||
UNIXコマンド・シェルで\f2orbd\fPを起動するには、次のように入力します。
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
WindowsのMS\-DOSシステム・プロンプトでは、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f21050\fPはネーム・サーバーを実行するポートです。\f2\-ORBInitialPort\fPは必要なコマンドラインの引数です。Solarisソフトウェアを使用する場合、1024より小さいポート上でプロセスを開始するには、rootユーザーになる必要があります。このため、1024以上のポート番号を使用することをお薦めします。
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPを起動します。
|
||||
.LP
|
||||
.LP
|
||||
Helloサーバーを起動するには、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
前回の手順とネーム・サーバー(\f2orbd\fP)のポートが同じであることを確認します。たとえば\f2\-ORBInitialPort 1050\fPのようになります。\f2servertool\fPは、ネーム・サーバーと同じポート上で起動する必要があります。
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPコマンドライン・インタフェースが表示されます。
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPプロンプトからHelloサーバーを起動します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool > register \-server HelloServer \-classpath . \-applicationName
|
||||
.fl
|
||||
HelloServerApName
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPによってサーバーが登録されて、「HelloServerApName」という名前がサーバーに割り当てられ、登録されているすべてのサーバー一覧とともにサーバーIDが表示されます。
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
別の端末ウィンドウまたはプロンプトからクライアント・アプリケーションを実行します。
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
この例の\f2\-ORBInitialHost localhost\fPは省略することができます。ネーム・サーバーがHelloクライアントとして同一ホスト上で動作しているからです。ネーム・サーバーが別のホストで動作している場合は、IDLネーム・サーバーが動作しているホストを\f2\-ORBInitialHost\fP \f2nameserverhost\fPで指定します。
|
||||
.LP
|
||||
.LP
|
||||
前回の手順と同様にネーム・サーバー(\f2orbd\fP)のポートを指定します。たとえば\f2\-ORBInitialPort 1050\fPのようになります。
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
サーバー・マネージャの操作が終了したら、ネーム・サーバー(\f2orbd\fP)と\f2servertool\fPを停止するか終了してください。
|
||||
.LP
|
||||
.LP
|
||||
DOSプロンプトで\f2orbd\fPをシャットダウンするには、サーバーを実行しているウィンドウを選択して\f2[Ctrl]+[C]\fPキーを押します。UNIXシェルで\f2orbd\fPをシャットダウンするには、プロセスを検出して終了(kill)します。サーバーを明示的に停止するまでは、呼出し待機状態が続きます。
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPをシャットダウンするには、\f2quit\fPと入力してキーボードの\f2[Enter]\fPキーを押します。
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2ネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
.br
|
||||
.TP 2
|
||||
o
|
||||
servertool(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.br
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH pack200 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
pack200 \- JARパック・ツール
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
形式
|
||||
.TP 2
|
||||
o
|
||||
説明
|
||||
.TP 2
|
||||
o
|
||||
オプション
|
||||
.TP 2
|
||||
o
|
||||
終了ステータス
|
||||
.TP 2
|
||||
o
|
||||
関連項目
|
||||
.TP 2
|
||||
o
|
||||
注意
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.LP
|
||||
\f4pack200\fP\f2 [ \fP\f2options\fP ] \f2output\-file\fP \f2JAR\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
オプションの指定順序に決まりはありません。コマンドラインまたはpropertiesファイルに指定された最後のオプションが、それ以前に指定されたすべてのオプションより優先されます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
コマンドライン・オプション。
|
||||
.TP 3
|
||||
output\-file
|
||||
出力ファイルの名前。
|
||||
.TP 3
|
||||
JAR\-file
|
||||
入力ファイルの名前。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f2pack200\fPツールは、Java \f2gzip\fP圧縮プログラムを使用してJARファイルを\f2pack200\fP圧縮ファイルに変換するJavaアプリケーションです。\f2pack200\fPファイルは高圧縮のファイルで、帯域幅の節約やダウンロード時間の短縮や直接デプロイすることができます。
|
||||
.LP
|
||||
.LP
|
||||
\f2pack200\fPツールには、圧縮エンジンの設定や微調整を行うオプションが用意されています。
|
||||
.LP
|
||||
.SS
|
||||
一般的な使用方法:
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 myarchive.pack.gz myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
この例では、デフォルトの\f2pack200\fP設定を使用して\f2myarchive.pack.gz\fPが生成されます。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f4\-r \-\-repack\fP
|
||||
.LP
|
||||
.LP
|
||||
ファイル\f2myarchive.jar\fPをパックした後アンパックすることで、JARファイルを生成します。生成されたファイルは\f2jarsigner(1)\fPツールの入力ファイルとして使用できます。
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive\-packer.jar myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-g \-\-no\-gzip\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2pack200\fPファイルを生成します。このオプションを指定するときは、適切な圧縮ツールを使用する必要があります。また、ターゲット・システムでは、対応する圧縮解除ツールを使用する必要があります。
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-no\-gzip myarchive.pack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-G \-\-strip\-debug\fP
|
||||
.LP
|
||||
.LP
|
||||
出力からデバッグ用の属性を削除します。これには、\f2SourceFile\fP、\f2LineNumberTable\fP、\f2LocalVariableTable\fP、\f2LocalVariableTypeTable\fPが含まれます。これらの属性を削除すれば、ダウンロードとインストールのサイズは小さくなりますが、デバッガの機能は制限されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
入力ファイル内のファイルの順序を維持します。これがデフォルトの動作です。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-O \-\-no\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
パック・ツールは、すべての要素を並べ替えて転送します。さらに、JARディレクトリ名が削除される場合があります。このため、ダウンロードのサイズは小さくなりますが、インデックスをはじめとするJARファイルの最適化機能は正常に動作しなくなることがあります。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Svalue \-\-segment\-limit=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
この値は、各アーカイブ・セグメントの予想ターゲット・サイズN(バイト単位)です。単一の入力ファイルの必要サイズが
|
||||
.br
|
||||
Nバイトを超えると、そのファイルには独立したアーカイブ・セグメントが割り当てられます。特殊なケースとして、値が\f2\-1\fPの場合は、すべての入力ファイルを含む大きな単一のセグメントが生成され、値が\f20\fPの場合は、クラスごとにセグメントが1つずつ生成されます。アーカイブ・セグメントが大きくなると、断片化が少なくなり圧縮率が高くなりますが、その処理には多くのメモリーが必要です。
|
||||
.LP
|
||||
.LP
|
||||
各セグメントのサイズは、セグメントに変換されるそれぞれの入力ファイルのサイズのほか、その名前と他の送信されるプロパティのサイズを計算して推測されます。
|
||||
.LP
|
||||
.LP
|
||||
デフォルトは \-1です。つまり、パック・ツールは常に単一のセグメント出力ファイルを作成します。極端に大きな出力ファイルが生成される場合には、入力ファイルをセグメント化(分割)してより小さなJARにすることを強くお薦めします。
|
||||
.LP
|
||||
.LP
|
||||
この制限が課されていない10MBのJARパック・ファイルは通常、約10%小さくパックされます。しかし、パック・ツールでより大きなJavaヒープ(セグメントの制限の約10倍)を必要とする場合もあります。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Evalue \-\-effort=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
単一の10進数値を指定した場合、パック・ツールは、指定された圧縮率でアーカイブを圧縮します。レベル\f21\fPの場合は、比較的短い圧縮時間でやや大きめのファイルが生成されますが、レベル\f29\fPの場合は、非常に長い時間がかかるものの、より圧縮率の高いファイルが生成されます。特殊な値\f20\fPを指定した場合は、元のJARファイルを圧縮なしで直接コピーします。JSR 200標準では、すべての解凍プログラムが、この特別な場合をアーカイブ全体のパススルーと解釈するように規定しています。
|
||||
.LP
|
||||
.LP
|
||||
デフォルトは\f25\fPです。この場合、標準的な時間で適切な圧縮が行われます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
入力情報を保存するというデフォルト値を上書きします。転送されるアーカイブのサイズは大きくなる場合があります。次の値を指定できます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
true
|
||||
.TP 3
|
||||
false
|
||||
どちらの場合でも、指定に従ってパック・ツールがデフレーション・ヒントを出力アーカイブに設定します。アーカイブ要素の個々のデフレーション・ヒントは転送されません。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
keep
|
||||
入力JAR.内で見つかったデフレーション・ヒントを維持します。(これがデフォルトです。)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-mvalue \-\-modification\-time=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
次の値を指定できます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
latest
|
||||
パック・ツールは、元のアーカイブの使用可能なすべてのエントリのうちの最終更新時刻か、そのセグメントの使用可能なすべてのエントリの最終更新時刻を特定しようとします。この単一の値はセグメントの一部として転送され、各セグメントの全エントリに適用されます。この場合、すべてのインストール・ファイルに単一の日付が設定されるという問題はありますが、アーカイブの転送サイズを少し小さくすることができます。
|
||||
.TP 3
|
||||
keep
|
||||
入力JAR内で見つかった変更時刻を維持します。(これがデフォルトです。)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Pfile \-\-pass\-file=\fP\f2file\fP
|
||||
.LP
|
||||
.LP
|
||||
ファイルを圧縮せず、バイト単位で転送するように指定します。このオプションを繰返し使用して、複数のファイルを指定できます。システム・ファイル・セパレータがJARファイルセパレータ「\f2/\fP」に置き換えられる点を除き、パス名の変換は行われません。結果として得られるファイル名は、文字列として正確にJARファイルでの出現と一致している必要があります。fileにディレクトリ名を指定した場合、そのディレクトリ内のすべてのファイルが転送されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Uaction \-\-unknown\-attribute=\fP\f2action\fP
|
||||
.LP
|
||||
.LP
|
||||
デフォルトの動作を無効にします。たとえば、不明な属性を含むクラス・ファイルを指定したアクションで転送します。アクションとして指定可能な値は次のとおりです。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
error
|
||||
\f2pack200\fPの操作全体に失敗し、適切な解説が表示されます。
|
||||
.TP 3
|
||||
strip
|
||||
属性がドロップされます。注意: VM必須属性を削除するとクラス・ローダーの障害が発生することがあります。
|
||||
.TP 3
|
||||
pass
|
||||
この属性が検出された場合、クラス全体が1つのリソースとして転送されます。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Cattribute\-name=\fP\f2layout\fP \f3\-\-class\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Fattribute\-name=\fP\f2layout\fP \f3\-\-field\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Mattribute\-name=\fP\f2layout\fP \f3\-\-method\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Dattribute\-name=\fP\f2layout\fP \f3\-\-code\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.LP
|
||||
.LP
|
||||
これら4つのオプションでは、クラス・エンティティにClass属性、Field属性、Method属性、Code属性などの属性のレイアウトを指定できます。attribute\-nameには、これからレイアウトまたはアクションを定義する属性の名前を指定します。アクションとして指定可能な値は次のとおりです。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
some\-layout\-string
|
||||
レイアウト言語は、JSR 200仕様に定義されています。
|
||||
.LP
|
||||
例: \f2\-\-class\-attribute=SourceFile=RUH\fP
|
||||
.TP 3
|
||||
error
|
||||
この属性が検出された場合、pack200の操作に失敗し、適切な解説が表示されます。
|
||||
.TP 3
|
||||
strip
|
||||
この属性が検出された場合、属性は出力から削除されます。注意: VM必須属性を削除するとクラス・ローダーの障害が発生することがあります。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
例: \f2\-\-class\-attribute=CompilationID=pass\fPというこの属性を含むクラス・ファイルを転送します。パック・ツールは、その他のアクションを行いません。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-f\fP\f2 \fP\f2pack.properties\fP \f3\-\-config\-file=\fP\f2pack.properties\fP
|
||||
.LP
|
||||
.LP
|
||||
コマンドラインに、パック・ツールを初期化するためのJavaプロパティが含まれている構成ファイルを指定できます。
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-f pack.properties myarchive.pack.gz myarchive.jar\fP
|
||||
.br
|
||||
\f2% more pack.properties\fP
|
||||
.br
|
||||
\f2# Generic properties for the packer.\fP
|
||||
.br
|
||||
\f2modification.time=latest\fP
|
||||
.br
|
||||
\f2deflate.hint=false\fP
|
||||
.br
|
||||
\f2keep.file.order=false\fP
|
||||
.br
|
||||
\f2# This option will cause the files bearing new attributes to\fP
|
||||
.br
|
||||
\f2# be reported as an error rather than passed uncompressed.\fP
|
||||
.br
|
||||
\f2unknown.attribute=error\fP
|
||||
.br
|
||||
\f2# Change the segment limit to be unlimited.\fP
|
||||
.br
|
||||
\f2segment.limit=\-1\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-v \-\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
最小限のメッセージを出力します。このオプションを複数指定すると、より長いメッセージが出力されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-q \-\-quiet\fP
|
||||
.LP
|
||||
.LP
|
||||
メッセージを表示せずに動作するように指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
|
||||
.LP
|
||||
.LP
|
||||
出力メッセージのログ・ファイルを指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-? \-h \-\-help\fP
|
||||
.LP
|
||||
.LP
|
||||
このコマンドに関するヘルプ情報を出力します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-V \-\-version\fP
|
||||
.LP
|
||||
.LP
|
||||
このコマンドに関するバージョン情報を出力します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-J\fP\f2option\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2option\fPを、\f2pack200\fPから呼び出されたJava起動ツールに渡します。たとえば、\f2\-J\-Xms48m\fPと指定すると、スタートアップ・メモリーが48Mバイトに設定されます。このオプションは\f2\-X\fPで始まっていませんが、\f2pack200\fPの標準オプションではありません。\f2\-J\fPを使用して、Javaで記述されたアプリケーションを実行する背後のVMにオプション渡すことは、よく行われています。
|
||||
.LP
|
||||
.SH "終了ステータス"
|
||||
.LP
|
||||
.LP
|
||||
次の終了値が返されます。
|
||||
.LP
|
||||
.LP
|
||||
\f2\ 0\fP正常終了した場合
|
||||
.LP
|
||||
.LP
|
||||
\f2>0\fPエラーが発生した場合
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
unpack200(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java SEのドキュメント\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/index.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Javaデプロイメント・ガイド \- Pack200\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
|
||||
.TP 2
|
||||
o
|
||||
jar(1) \- Java Archiveツール
|
||||
.TP 2
|
||||
o
|
||||
jarsigner(1) \- JAR署名ツール
|
||||
.TP 2
|
||||
o
|
||||
\f2attributes(5)\fPのマニュアル・ページ
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "注意"
|
||||
.LP
|
||||
.LP
|
||||
このコマンドと\f2pack(1)\fPを混同しないでください。これらは別製品です。
|
||||
.LP
|
||||
.LP
|
||||
JDKに付属するJava SE API仕様との相違が見つかった場合には、仕様を優先してください。
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH policytool 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
policytool \- PolicyTool管理GUIユーティリティ
|
||||
.LP
|
||||
\f3policytool\fPは、ユーティリティGUI経由で取得したユーザー入力に基づいて、プレーン・テキストのポリシー・ファイルを読み書きします。
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
形式
|
||||
.TP 2
|
||||
o
|
||||
説明
|
||||
.TP 2
|
||||
o
|
||||
オプション
|
||||
.TP 2
|
||||
o
|
||||
関連項目
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.LP
|
||||
policytool管理者ユーティリティを実行します
|
||||
.LP
|
||||
.LP
|
||||
\f4policytool\fP
|
||||
.LP
|
||||
.LP
|
||||
policytoolを実行し、指定されたポリシー・ファイルを読み込みます
|
||||
.LP
|
||||
.LP
|
||||
\f4policytool\fP\f2[\-file\ \fP\f2filename\fP\f2]\fP
|
||||
.LP
|
||||
.LP
|
||||
説明
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
ローカル・ポリシー・ファイルを読み込むように\f2policytool\fPに指示します
|
||||
.TP 3
|
||||
filename
|
||||
ファイル名
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f3policytool\fPは、ユーザーがローカル・ポリシー・ファイルの内容を管理することを可能にするGUIです。詳細は、
|
||||
.na
|
||||
\f2ポリシー・ファイル作成および管理ツール\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.htmlを参照してください。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
\f2filename\fPを読み込みます。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.na
|
||||
\f2デフォルトのポリシー実装および構文\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
.na
|
||||
\f2ポリシー・ツール・ユーザーズ・ガイド\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
.na
|
||||
\f2セキュリティ権限\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/permissions.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
.na
|
||||
\f2セキュリティの概要\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/overview/jsoverview.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,309 @@
|
||||
." Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH rmid 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
rmid \- Java RMI起動システム・デーモン
|
||||
.LP
|
||||
.LP
|
||||
\f3rmid\fPでアクティブ化するシステム・デーモンを開始すると、オブジェクトを仮想マシン(VM)に登録してアクティブ化できるようになります。
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid [options]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f3rmid\fPツールは、起動システム・デーモンを開始します。アクティブ化システム・デーモンを開始してからでないと、アクティブ化可能オブジェクトをアクティブ化システムに登録したり、VM内でアクティブ化したりすることができません。起動可能なリモート・オブジェクトを使用したプログラムの作成方法の詳細は、
|
||||
.na
|
||||
\f2Java RMI仕様\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/platform/rmi/spec/rmiTOC.htmlおよび
|
||||
.na
|
||||
\f2起動のチュートリアル\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/activation/overview.htmlを参照してください。
|
||||
.LP
|
||||
.LP
|
||||
デーモンを起動するには、次のように、セキュリティ・ポリシー・ファイルを指定して\f2rmid\fPコマンドを実行します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3注意:\fP \f2rmid\fPのSunの実装を実行する場合、デフォルトでは、セキュリティ・ポリシー・ファイルを指定する必要があります。それは、\f2rmid\fPが起動グループ用にVMを起動するために各\f2ActivationGroupDesc\fP内の情報を使用できるかどうかを検証できるようにするためです。特に、\f2ActivationGroupDesc\fPのコンストラクタに渡される\f2CommandEnvironment\fPや任意の\f2Properties\fPによって指定されるコマンドおよびオプションは、\f2rmid\fPのセキュリティ・ポリシー・ファイルの中で明示的に許可することが必要になりました。\f2sun.rmi.activation.execPolicy\fPプロパティの値は、起動グループ用にVMを起動するために\f2ActivationGroupDesc\fP内の情報を使用できるかどうかを判断するときに\f2rmid\fPが使用するポリシーを決定します。
|
||||
.LP
|
||||
.LP
|
||||
\f2rmid\fPをデフォルト設定で実行すると、次のような処理が行われます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
アクティベータを起動し、デフォルト・ポート1098で内部レジストリを起動する
|
||||
.TP 2
|
||||
o
|
||||
この内部レジストリの中で、\f2ActivationSystem\fPを\f2java.rmi.activation.ActivationSystemという名前に\fPバインドする
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
レジストリに他のポートを指定するには、\f2rmid\fPの起動時に\f2\-port\fPオプションを指定する必要があります。次に示します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy \-port 1099
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
このコマンドは、起動システム・デーモンを開始し、レジストリのデフォルト・ポート1099でレジストリを開始します。
|
||||
.LP
|
||||
.SS
|
||||
rmidをinetd/xinetdから開始する
|
||||
.LP
|
||||
.LP
|
||||
\f2rmid\fPをコマンドラインから開始するには、\f2inetd\fP(Solarisの場合)、または\f2xinetd\fP(Linuxの場合)を構成して\f2rmid\fPを必要に応じて開始する方法もあります。
|
||||
.LP
|
||||
.LP
|
||||
\f2rmid\fPを開始すると、\f2System.inheritedChannel\fPメソッドを呼び出して、継承されたチャンネル(\f2inetd\fP/\f2xinetd\fPから継承)を取得しようとします。継承されたチャンネルが\f2null\fPであるか、\f2java.nio.channels.ServerSocketChannel\fPのインスタンスでなかった場合、\f2rmid\fPはそのチャンネルは\f2inetd\fP/\f2xinetd\fPによって起動されたものではないと判断し、前述のように起動します。
|
||||
.LP
|
||||
.LP
|
||||
継承されたチャンネルが\f2ServerSocketChannel\fPインスタンスである場合は、\f2rmid\fPはエクスポートするリモート・オブジェクト、つまり\f2java.rmi.activation.ActivationSystem\fPがバインドされているレジストリと\f2java.rmi.activation.Activator\fPリモート・オブジェクトに対するリクエストを受信するサーバー・ソケットとして、\f2ServerSocketChannel\fPから取得した\f2java.net.ServerSocket\fPを使用します。このモードでは、\f2rmid\fPの動作は、\f2次のことを除いて\fP、コマンドラインから起動した場合と同じです。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f2System.err\fPに対する出力は、ファイルにリダイレクトされる。このファイルは\f2java.io.tmpdir\fPシステム・プロパティで指定されるディレクトリ(通常は\f2/var/tmp\fPまたは\f2/tmp\fP)にある。ファイル名の接頭辞は\f2"rmid\-err"\fPで、接尾辞は\f2"tmp"\fPである。
|
||||
.TP 2
|
||||
o
|
||||
\f2\-port\fPオプションは拒否される。このオプションを指定すると、\f2rmid\fPはエラー・メッセージを出して終了する。
|
||||
.TP 2
|
||||
o
|
||||
\f2\-log\fPオプションは必須。このオプションを指定しないと、\f2rmid\fPはエラー・メッセージを出して終了する。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
必要に応じてサービスを開始するように構成する方法の詳細は、\f2inetd\fP(Solarisの場合)、または\f2xinetd\fP(Linux)のマニュアル・ページを参照してください。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-C<someCommandLineOption>
|
||||
\f2rmid\fPの子プロセス(起動グループ)が作成されたときに、それぞれの子プロセスにコマンドライン引数として渡されるオプションを指定します。たとえば、次のように指定すると、起動システム・デーモンによって生成される各仮想マシンにプロパティを渡すことができます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Dsome.property=value
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
コマンドライン引数を子プロセスに渡す機能は、デバッグを行う場合に便利です。たとえば、次のようなコマンドを実行できます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Djava.rmi.server.logCalls=true
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
このコマンドにより、すべての子VMでサーバー呼出しのログが作成されるようになります。
|
||||
.LP
|
||||
.TP 3
|
||||
\-J<someCommandLineOption>
|
||||
\f2rmid\fPを実行している\f2java\fPインタプリタに渡すオプションを指定します。たとえば、\f2rmid\fPが\f2rmid.policy\fPという名前のポリシー・ファイルを使用するように指定するには、\f2rmid\fPのコマンドラインで\f2\-J\fPオプションを使用して、\f2java.security.policy\fPプロパティを定義します。次に例を示します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-J\-Dsun.rmi.activation.execPolicy=<policy>
|
||||
起動グループが実行されることになるVMの起動に使用するコマンドおよびコマンドライン・オプションをチェックするために、\f2rmid\fPが採用するポリシーを指定します。このオプションは、Java RMI起動デーモンのSunの実装のみに存在することに注意してください。コマンドラインにこのプロパティを指定しない場合、結果は\f2\-J\-Dsun.rmi.activation.execPolicy=default\fPを指定した場合と同じになります。\f2<policy>\fPに指定可能な値は、\f2default\fP、\f2<policyClassName>\fP、または\f2none\fPです。
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f3default(または、このプロパティが\fP\f4指定されていない\fP\f3場合)\fP
|
||||
.LP
|
||||
デフォルトの\f2execPolicy\fPの場合、\f2rmid\fPが実行できるのは、\f2rmid\fPが使用するセキュリティ・ポリシー・ファイルの中で、実行する権限が\f2rmid\fPに与えられているコマンドおよびコマンドライン・オプションのみです。\f2デフォルト\fPの実行ポリシーで使用できるのは、デフォルトの起動グループ実装のみです。
|
||||
.LP
|
||||
\f2rmid\fPは、起動グループ用のVMを起動するときに、そのグループについて登録された起動グループ記述子である\f2ActivationGroupDesc\fP内の情報を使用します。グループ記述子は、\f2ActivationGroupDesc.CommandEnvironment\fPを指定します(省略可能)。これには、起動グループを開始する\f2コマンド\fPと、そのコマンドラインに追加できるコマンドライン・\f2オプション\fPが含まれています。デフォルトでは、\f2rmid\fPは\f2java.home\fPにある\f2java\fPコマンドを使用します。グループ記述子には、オプションとしてコマンドラインに追加される\f2プロパティ\fP・オーバーライドも含まれています。このプロパティは、次のように定義します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-D\fP\f4<property>\fP\f3=\fP\f4<value>\fP\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.LP
|
||||
アクセス権\f2com.sun.rmi.rmid.ExecPermission\fPを使用すると、\f2rmid\fPに対して、グループ記述子の\f2CommandEnvironment\fPで指定されたコマンドを実行して起動グループを開始する権限を許可することができます。アクセス権\f2com.sun.rmi.rmid.ExecOptionPermission\fPを使用すると、グループ記述子でプロパティ・オーバーライドとして指定されたコマンドライン・オプション、または\f2CommandEnvironment\fPでオプションとして指定されたコマンドライン・オプションを、起動グループを開始するときに\f2rmid\fPが使用できるようになります。
|
||||
.LP
|
||||
\f2rmidに\fP様々なコマンドおよびオプションを実行する権限を許可する場合は、アクセス権\f2ExecPermission\fPおよび\f2ExecOptionPermission\fPを汎用的に許可する必要があります。つまり、すべてのコード・ソースに対して許可します。
|
||||
.RS 3
|
||||
.TP 3
|
||||
ExecPermission
|
||||
\f2ExecPermission\fPクラスは、起動グループを開始するために\f2rmidが\fP特定の\f2コマンド\fPを実行する権限を表します。
|
||||
.LP
|
||||
\f3構文\fP
|
||||
.br
|
||||
\f2ExecPermission\fPの\f2名前\fPは、\f2rmid\fPに実行を許可するコマンドのパス名です。「/*」(「/」はファイル区切り文字\f2File.separatorChar\fP)で終わるパス名は、そのディレクトリに含まれるすべてのファイルを示します。「/\-」で終わるパス名は、そのディレクトリに含まれるすべてのファイルとサブディレクトリ(再帰的に)を示します。パス名に特別なトークン「<<ALL FILES>>」を指定した場合は、\f3任意の\fPファイルを示します。
|
||||
.LP
|
||||
\f3注意:\fP 「*」を1つのみ指定したパス名は、現在のディレクトリ内のすべてのファイルを表します。また、「\-」を1つのみ指定したパス名は、現在のディレクトリ内のすべてのファイルと、現在のディレクトリに含まれるすべてのファイルとサブディレクトリ(再帰的に)を表します。
|
||||
.TP 3
|
||||
ExecOptionPermission
|
||||
\f2ExecOptionPermission\fPクラスは、起動グループを開始するときに\f2rmid\fPで特定のコマンドライン・\f2オプション\fPを使用できる権限を表します。\f2ExecOptionPermission\fPの\f2名前\fPは、コマンドライン・オプションの値です。
|
||||
.LP
|
||||
\f3構文\fP
|
||||
.br
|
||||
オプションでは、ワイルドカードが限定的にサポートされます。アスタリスクは、ワイルドカード・マッチを表します。アスタリスクは、オプション名そのものとして使用できます。つまり、任意のオプションを表すことができます。また、オプション名の末尾に使用することもできます。ただし、「.」か「=」の直後にアスタリスクを指定する必要があります。
|
||||
.LP
|
||||
例を示します。「*」、「\-Dfoo.*」、「\-Da.b.c=*」は有効ですが、「*foo」、「\-Da*b」、「ab*」は無効です。
|
||||
.TP 3
|
||||
rmidのポリシー・ファイル
|
||||
\f2rmidに\fP様々なコマンドおよびオプションを実行する権限を許可する場合は、アクセス権\f2ExecPermission\fPおよび\f2ExecOptionPermission\fPを汎用的に許可する必要があります。つまり、すべてのコード・ソースに対して許可します。これらのアクセス権をチェックするのは\f2rmid\fPのみなので、これらのアクセス権を汎用的に許可しても安全です。
|
||||
.LP
|
||||
\f2rmid\fPに各種の実行権限を許可するポリシー・ファイルの例を、次に示します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
grant {
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/java/jdk1.7.0/solaris/bin/java";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/rmidcmds/*";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.policy=/files/policies/group.policy";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.debug=*";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Dsun.rmi.*";
|
||||
.fl
|
||||
};
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
最初に付与されているアクセス権は、\f2rmid\fPに対し、パス名により明示的に指定される\f2java\fPコマンドの1.7.0バージョンの実行を許可します。デフォルトでは、\f2java.home\fPにあるバージョンの\f2java\fPコマンドを使用します。\f2rmid\fPが使用するのと同じバージョンが使用されるため、そのコマンドは、ポリシー・ファイルで指定する必要はありません。2番目のアクセス権は、\f2rmid\fPに対して、ディレクトリ\f2/files/apps/rmidcmds\fP内の任意のコマンドの実行権限を許可します。
|
||||
.LP
|
||||
3番目に付与されているアクセス権\f2ExecOptionPermission\fPは、\f2rmid\fPに対して、セキュリティ・ポリシー・ファイルを\f2/files/policies/group.policy\fPとして定義している起動グループの開始を許可します。次のアクセス権は、起動グループが\f2java.security.debug\fPプロパティを使用することを許可しています。最後のアクセス権は、起動グループが\f2sun.rmi\fPというプロパティ名の階層内の任意のプロパティを使用することを許可しています。
|
||||
.LP
|
||||
ポリシー・ファイルを指定して\f2rmid\fPを起動するには、\f2rmid\fPのコマンドラインで\f2java.security.policy\fPプロパティを指定する必要があります。次に例を示します。
|
||||
.LP
|
||||
\f2rmid \-J\-Djava.security.policy=rmid.policy\fP
|
||||
.RE
|
||||
.TP 2
|
||||
o
|
||||
\f4<policyClassName>\fP
|
||||
.LP
|
||||
デフォルトの動作では十分な柔軟性が得られない場合、管理者は、\f2rmid\fPの起動時に、\f2checkExecCommand\fPメソッドが所属するクラスの名前を指定して、rmidが実行するコマンドをチェックすることができます。
|
||||
.LP
|
||||
\f2policyClassName\fPには、引数なしのコンストラクタを持ち、次のような\f2checkExecCommand\fPメソッドを実装しているpublicクラスを指定します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
public void checkExecCommand(ActivationGroupDesc desc,
|
||||
.fl
|
||||
String[] command)
|
||||
.fl
|
||||
throws SecurityException;
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
アクティブ化グループを開始する前に、\f2rmid\fPは、ポリシーの\f2checkExecCommand\fPメソッドを呼び出します。このとき、アクティブ化グループの記述子と、アクティブ化グループを開始するための完全なコマンドを含む配列をそのメソッドに渡します。\f2checkExecCommand\fPが\f2SecurityException\fPをスローすると、\f2rmid\fPはそのアクティブ化グループを開始せず、オブジェクトのアクティブ化を試行している呼出し側には\f2ActivationException\fPがスローされます。
|
||||
.TP 2
|
||||
o
|
||||
\f3none\fP
|
||||
.LP
|
||||
\f2sun.rmi.activation.execPolicy\fPプロパティの値が「none」の場合、\f2rmid\fPは、起動グループを開始するコマンドをまったく検証しません。
|
||||
.RE
|
||||
.LP
|
||||
.TP 3
|
||||
\-log dir
|
||||
起動システム・デーモンがデータベースおよび関連情報を書き込むのに使用するディレクトリの名前を指定します。デフォルトでは、\f2rmid\fPコマンドを実行したディレクトリに、\f2log\fPというログ・ディレクトリが作成されます。
|
||||
.LP
|
||||
.TP 3
|
||||
\-port port
|
||||
\f2rmid\fPのレジストリが使用するポートを指定します。起動システム・デーモンは、このレジストリの中で、\f2java.rmi.activation.ActivationSystem\fPという名前で\f2ActivationSystem\fPをバインドします。したがって、ローカル・マシン上の\f2ActivationSystem\fPは、次のように\f2Naming.lookup\fPメソッドを呼び出すことによって取得できます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.rmi.*;
|
||||
.fl
|
||||
import java.rmi.activation.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
ActivationSystem system; system = (ActivationSystem)
|
||||
.fl
|
||||
Naming.lookup("//:\fP\f4port\fP/java.rmi.activation.ActivationSystem");
|
||||
.fl
|
||||
.fi
|
||||
.TP 3
|
||||
\-stop
|
||||
\f2\-port\fPオプションによって指定されたポートの、現在の\f2rmid\fP呼出しを停止します。ポートが指定されていない場合は、ポート1098で実行されている\f2rmid\fPを停止します。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "環境変数"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
CLASSPATH
|
||||
ユーザー定義クラスへのパスをシステムに指定します。ディレクトリはコロンで分割します。次に例を示します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.LP
|
||||
rmic(1)、
|
||||
.na
|
||||
\f2CLASSPATH\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/tools/index.html#classpath、java(1)
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
." Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH rmiregistry 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
rmiregistry \- Javaリモート・オブジェクト・レジストリ
|
||||
.LP
|
||||
.RS 3
|
||||
\f3rmiregistry\fPコマンドは、現在のホストの指定したポート上にリモート・オブジェクト・レジストリを開始します。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry [\fP\f4port\fP\f3]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f3rmiregistry\fPコマンドは、現在のホストの指定\f2port\fP上にリモート・オブジェクト・レジストリを作成し、開始します。\f2port\fPの指定を省略した場合、レジストリはポート1099で開始します。\f3rmiregistry\fPコマンドに、出力機能はありません。通常、これはバックグラウンドで実行されます。次に例を示します。
|
||||
.LP
|
||||
.LP
|
||||
\f2rmiregistry &\fP
|
||||
.LP
|
||||
.LP
|
||||
リモート・オブジェクト・レジストリは、ブートストラップのネーム・サービスです。同一ホストのRMIサーバーが、リモート・オブジェクトを名前にバインドするために使用されます。次に、ローカルおよびリモート・ホストのクライアントはリモート・オブジェクトを検索し、リモート・メソッドの呼出しを行います。
|
||||
.LP
|
||||
.LP
|
||||
レジストリは、一般的に、最初のリモート・オブジェクトの位置を指定します。そこで、アプリケーションはメソッドを呼び出す必要があります。かわって、そのオブジェクトはアプリケーション指定のサポートを提供し、他のオブジェクトを探します。
|
||||
.LP
|
||||
.LP
|
||||
\f2java.rmi.registry.LocateRegistry\fPクラスのメソッドは、ローカル・ホスト、またはローカル・ホストとポートで動作するレジストリを取得するために使用されます。
|
||||
.LP
|
||||
.LP
|
||||
\f2java.rmi.Naming\fPクラスのURLベースのメソッドは、レジストリで動作し、任意のホストおよびローカル・ホスト上のリモート・オブジェクトの検索に使用されます。リモート・オブジェクトに単純な(文字列)名前をバインドしたり、新しい名前をリバインド(古いバインドにオーバーライド)します。またリモート・オブジェクトをアンバインドしたり、レジストリにバインドされたURLを出力します。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-J
|
||||
\f2\-J\fPの後ろに続くオプションを\f2java\fPインタプリタに引き渡します。\f2java\fPオプションと組み合せて使用します(\-Jとjavaオプションの間にスペースは入れない)。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
java(1)、
|
||||
.na
|
||||
\f2java.rmi.registry.LocateRegistry\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/api/java/rmi/registry/LocateRegistry.htmlおよび
|
||||
.na
|
||||
\f2java.rmi.Naming\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/api/java/rmi/Naming.html
|
||||
@@ -0,0 +1,94 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH servertool 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
servertool \- Java(tm)IDLサーバー・ツール
|
||||
.LP
|
||||
\f3servertool\fPはアプリケーション・プログラマが、永続サーバーの登録、登録解除、起動および停止を行うためのコマンドライン・インタフェースを提供します。
|
||||
.SH "形式"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool \-ORBInitialPort \fP\f4nameserverport\fP\f3 \fP\f3options\fP\f3 [ \fP\f3commands\fP\f3 ]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
コマンドを入力しないで\f2servertool\fPを起動すると、コマンドライン・ツールとして\f2servertool >\fPプロンプトが表示されます。\f2servertool >\fPプロンプトにコマンドを入力します。
|
||||
.LP
|
||||
.LP
|
||||
コマンドを入力して\f2servertool\fPを起動すると、Java IDLサーバー・ツールが起動し、コマンドを実行して終了します。
|
||||
.LP
|
||||
.LP
|
||||
\f2\-ORBInitialPort\fP \f2nameserverport\fPオプションは\f3必須\fPです。\f2nameserverport\fPの値には、\f2orbd\fPが実行され、着信リクエストを待機しているポートを指定する必要があります。Solarisソフトウェアを使用する場合、1024より小さいポート上でプロセスを開始するには、rootユーザーになる必要があります。このため、\f2nameserverport\fPとして1024以上のポート番号を使用することをお薦めします。
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f2servertool\fPはアプリケーション・プログラマが、永続サーバーの登録、登録解除、起動および停止を行うためのコマンドライン・インタフェースを提供します。その他に、サーバーに関する様々な統計情報を取得するためのコマンドも提供します。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-ORBInitialHost nameserverhost
|
||||
ネーム・サーバーが、実行され、着信リクエストを待機しているホスト・マシンを指定します。このオプションを指定しない場合、\f2nameserverhost\fPはデフォルトで\f2localhost\fPに設定されます。\f2orbd\fPと\f2servertool\fPが異なるマシン上で実行されている場合は、\f2orbd\fPが実行されているホストの名前とIPアドレスを指定する必要があります。
|
||||
.TP 3
|
||||
\-Joption
|
||||
Java仮想マシンに\f2option\fPを渡します。\f2option\fPには、java(1)のリファレンス・ページに記載されているオプションを1つ指定します。たとえば、\f3\-J\-Xms48m\fPと指定すると、スタートアップ・メモリーは48Mバイトに設定されます。\f3\-J\fPを使用して背後の仮想マシンにオプションを渡すことはよく行われています。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "コマンド"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
register \-server\ <server\ class\ name> \ \-classpath\ <classpath\ to\ server> [\ \-applicationName\ <application\ name> \-args\ <args\ to\ server> \-vmargs\ <flags\ to\ be\ passed\ to\ Java\ VM> \ ]
|
||||
Object Request Broker Daemon(ORBD)に新規永続サーバーを登録します。サーバーが未登録の場合、登録してアクティブ化します。このコマンドによって、\f2\-server\fPオプションで識別されるサーバーのメイン・クラス内でインストール・メソッドが呼び出されます。このインストール・メソッドは、\f2public static void install(org.omg.CORBA.ORB)\fPになっている必要があります。インストール・メソッドは、オプションであり、データベース・スキーマの作成などの独自のサーバー・インストール動作を開発者が指定できます。
|
||||
.TP 3
|
||||
unregister \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
サーバーIDまたはアプリケーション名を使用して、ORBDのサーバーの登録を解除します。このコマンドによって、\f2\-server\fPオプションで識別されるサーバーのメイン・クラス内でアンインストール・メソッドが呼び出されます。このアンインストール・メソッドは、\f2public static void uninstall(org.omg.CORBA.ORB)\fPになっている必要があります。アンインストール・メソッドは、オプションであり、インストール・メソッドの動作の取り消しなどの独自のサーバー・アンインストール動作を開発者が指定できます。
|
||||
.TP 3
|
||||
getserverid \-applicationName\ <application\ name>
|
||||
アプリケーションに関連付けられているサーバーIDを返します。
|
||||
.TP 3
|
||||
list
|
||||
ORBDに登録されているすべての永続サーバーに関する情報を一覧表示します。
|
||||
.TP 3
|
||||
listappnames
|
||||
現在ORBDに登録されているすべてのサーバーのアプリケーション名を一覧表示します。
|
||||
.TP 3
|
||||
listactive
|
||||
ORBDによって起動され、現在実行されているすべての永続サーバーに関する情報を一覧表示します。
|
||||
.TP 3
|
||||
locate \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name> [\-endpointType\ <endpointType>\ ]
|
||||
登録されたサーバーで作成したすべてのORBの特定のタイプについてエンドポイント(ポート)を検出します。サーバーが実行されていない場合、アクティブ化されます。エンドポイント・タイプが指定されていない場合、サーバーのORBごとに関連付けられているplainタイプまたはnon\-protectedタイプのエンドポイントが返されます。
|
||||
.TP 3
|
||||
locateperorb \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name> [\-orbid\ <ORB\ name>\ ]
|
||||
登録されたサーバーの特定のORBで登録されたエンドポイント(ポート)を検出します。サーバーが実行されていない場合、アクティブ化されます。\f2orbid\fPが指定されていない場合は、デフォルト値の「""」が\f2orbid\fPに割り当てられます。ORBが空文字列の\f2orbid\fPで作成されている場合、登録したポートがすべて返されます。
|
||||
.TP 3
|
||||
orblist \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
サーバー上に定義されたORBのORBIdを一覧表示します。ORBIdはサーバーで作成されたORBの文字列名です。サーバーが実行されていない場合、アクティブ化されます。
|
||||
.TP 3
|
||||
shutdown \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
ORBDに登録されたアクティブなサーバーを停止します。このコマンドの実行中に、\f2\-serverid\fPパラメータまたは\f2\-applicationName\fPパラメータで指定されたクラス内に定義された\f2shutdown()\fPメソッドも呼び出されてサーバー・プロセスを正しく停止します。
|
||||
.TP 3
|
||||
startup \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
ORBDに登録されたサーバーを起動します。サーバーが実行されていない場合は、このコマンドでサーバーを起動します。サーバーがすでに実行されている場合は、ユーザーにエラー・メッセージが返されます。
|
||||
.TP 3
|
||||
help
|
||||
サーバーがサーバー・ツールで使用できるすべてのコマンドを表示します。
|
||||
.TP 3
|
||||
quit
|
||||
サーバー・ツールを終了します。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
orbd(1)
|
||||
@@ -0,0 +1,475 @@
|
||||
." Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH tnameserv 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
Java IDL: 一時ネーム・サービス \- \f2tnameserv\fP
|
||||
.LP
|
||||
.LP
|
||||
このドキュメントでは、Java IDL一時ネーム・サービス\f2tnameserv\fPの使用方法について説明します。Java IDLには、Object Request Broker Daemon(ORBD)も含まれています。ORBDは、ブートストラップ・サービス、一時ネーム・サービス、\f3永続\fPネーム・サービスおよびサーバー・マネージャを含むデーモン・プロセスです。Java IDLのすべてのチュートリアルではORBDを使用していますが、一時ネーム・サービスを使用する例では、\f2orbd\fPのかわりに\f2tnameserv\fPを使用できます。\f2orbd\fPツールの詳細は、orbdのorbd(1)または
|
||||
.na
|
||||
\f2ORBDに含まれるJava IDLネーム・サービス\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.htmlに関するトピックを参照してください。
|
||||
.LP
|
||||
.LP
|
||||
ここでは、以下の項目について説明します。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Java\ IDL一時ネーム・サービス
|
||||
.TP 2
|
||||
o
|
||||
Java\ IDL一時ネーム・サービスの起動
|
||||
.TP 2
|
||||
o
|
||||
Java\ IDL一時ネーム・サービスの停止
|
||||
.TP 2
|
||||
o
|
||||
サンプル・クライアント: 名前空間へのオブジェクトの追加
|
||||
.TP 2
|
||||
o
|
||||
サンプル・クライアント: 名前空間のブラウズ
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Java IDL一時ネーム・サービス"
|
||||
.LP
|
||||
.LP
|
||||
CORBAのCOS(Common Object Services)ネーム・サービスは、ファイル・システムがファイルに対してディレクトリ構造を提供しているのと同じように、オブジェクト参照に対してツリー構造のディレクトリを提供します。Java IDLの一時ネーム・サービスである\f2tnameserv\fPは、COSネーム・サービスの仕様を単純な形で実装したものです。
|
||||
.LP
|
||||
.LP
|
||||
オブジェクト参照は名前空間に名前で格納され、オブジェクト参照と名前のペアは、それぞれネーム・\f2バインディング\fPと呼ばれます。ネーム・バインディングは\f2ネーミング・コンテキスト\fPに組み込むことができます。ネーミング・コンテキストはそれ自体がネーム・バインディングであり、ファイル・システムのサブディレクトリと同じ編成機能を持ちます。すべてのバインディングは\f2初期ネーミング・コンテキスト\fPに格納されます。名前空間において、初期ネーミング・コンテキストは唯一の永続的バインディングです。それ以外のネーミング・コンテキストは、Java IDLのネーミング・サービス・プロセスが停止し、再起動されると失われます。
|
||||
.LP
|
||||
.LP
|
||||
アプレットまたはアプリケーションからCOSネーム・サービスを使用するためには、そのORBがネーム・サービスが動作しているホストのポートを知っているか、そのネーム・サービスの文字列化された初期ネーミング・コンテキストにアクセスできる必要があります。ネーム・サービスは、Java IDLのネーム・サービスでもその他のCOS準拠のネーム・サービスでもかまいません。
|
||||
.LP
|
||||
.SH "Java IDL一時ネーム・サービスの起動"
|
||||
.LP
|
||||
.LP
|
||||
Java IDLネーム・サービスは、ネーム・サービスを使用するアプリケーションまたはアプレットより前に起動しておく必要があります。Java\ IDL製品をインストールすると、Java\ IDLネーム・サービスを起動するスクリプト(Solaris: \f2tnameserv\fP)または実行可能ファイル(Windows NT: \f2tnameserv.exe\fP)が作成されます。バックグラウンドで動作するように、ネーム・サービスを起動してください。
|
||||
.LP
|
||||
.LP
|
||||
特に指定しない場合、Java IDLネーム・サービスは、ORBの\f2resolve_initial_references()\fPメソッドと\f2list_initial_references()\fPメソッドの実装に使用するブートストラップ・プロトコルに対してポート900で待機します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort \fP\f4nameserverport\fP\f3&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
ネーム・サーバー・ポートを指定しない場合、デフォルトでポート900が使用されます。Solarisソフトウェアの実行時は、1024より小さいポートでプロセスを開始する場合、rootユーザーになる必要があります。このため、1024以上のポート番号を使用することをお薦めします。1050のように別のポートを指定し、ネーム・サービスをバックグラウンドで実行するには、UNIXコマンド・シェルで次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort 1050&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
WindowsのMS\-DOSシステム・プロンプトでは、次のように入力します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start tnameserv \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
ネーム・サーバーのクライアントには、新しいポート番号を知らせる必要があります。これを行うには、ORBオブジェクトの作成時に\f2org.omg.CORBA.ORBInitialPort\fPプロパティに新しいポート番号を設定します。
|
||||
.LP
|
||||
.SS
|
||||
異なるマシン上でのクライアントとサーバーの実行
|
||||
.LP
|
||||
.LP
|
||||
Java IDLとRMI\-IIOPのほとんどのチュートリアルでは、ネーム・サービス、サーバーおよびクライアントはすべて開発用のマシン上で実行されます。実際にデプロイメントする場合には、クライアントとサーバーを、ネーム・サービスとは異なるホスト上で実行することが多くなります。
|
||||
.LP
|
||||
.LP
|
||||
クライアントとサーバーがネーム・サービスを見つけるには、クライアントとサーバーが、ネーム・サービスが実行されているポートの番号とホストを認識している必要があります。そのためには、クライアントとサーバーのファイル内の\f2org.omg.CORBA.ORBInitialPort\fPプロパティと\f2org.omg.CORBA.ORBInitialHost\fPプロパティをネーム・サービスが実行されているポートの番号とマシンの名前に設定します。この例は、
|
||||
.na
|
||||
\f2RMI\-IIOPを使用したHello Worldの例\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/rmi\-iiop/rmiiiopexample.htmlに示されています。コマンドライン・オプション\f2\-ORBInitialPort\fP \f2nameserverport#\fPと\f2\-ORBInitialHost\fP \f2nameserverhostname\fPを使用して、クライアントとサーバーに対してネーム・サービスを探す場所を指定することもできます。
|
||||
.na
|
||||
\f2Java IDL: 2台のマシン上で実行するHello Worldプログラム\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/tutorial/jidl2machines.htmlには、コマンドライン・オプションを使用して指定する方法が示されています。
|
||||
.LP
|
||||
.LP
|
||||
たとえば、一時ネーム・サービス\f2tnameserv\fPが、ホスト\f2nameserverhost\fPのポート1050上で実行されているとします。さらに、クライアントがホスト\f2clienthost\fP上で実行され、サーバーはホスト\f2serverhost\fP上で実行されているとします。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
次のように、ホスト\f2nameserverhost\fP上で\f2tnameserv\fPを起動します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort 1050
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 2
|
||||
o
|
||||
次のように、\f2serverhost\fP上でサーバーを起動します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java Server \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 2
|
||||
o
|
||||
次のように、\f2clienthost\fP上でクライアントを起動します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java Client \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
\-Jオプション
|
||||
.LP
|
||||
このコマンドライン・オプションは、\f2tnameserve\fPとともに使用できます。
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Joption
|
||||
Java仮想マシンに\f2option\fPを渡します。\f2option\fPには、java(1)のリファレンス・ページに記載されているオプションを1つ指定します。たとえば、\f3\-J\-Xms48m\fPと指定すると、スタートアップ・メモリーは48Mバイトに設定されます。\f3\-J\fPを使用して背後の仮想マシンにオプションを渡すことはよく行われています。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Java IDL一時ネーム・サービスの停止"
|
||||
.LP
|
||||
.LP
|
||||
Java IDLネーム・サービスを停止するには、Unixの場合は、\f2kill\fPなどのオペレーティング・システムのコマンドを使用し、Windowsの場合は、\f2[Ctrl]+[C]\fPキーを使用します。ネーム・サービスを明示的に停止するまでは、呼出し待機状態が続きます。サービスを終了させると、Java IDLネーム・サービスに登録されている名前は失われます。
|
||||
.LP
|
||||
.SH "サンプル・クライアント: 名前空間へのオブジェクトの追加"
|
||||
.LP
|
||||
.LP
|
||||
次に示すサンプル・プログラムは、名前を名前空間に追加する方法を示すものです。このサンプル・プログラムは、このままの状態で完全に動作する一時ネーム・サービス・クライアントで、次のような単純なツリーを作成するものです。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f4初期ネーミング・コンテキスト\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
*
|
||||
\f3plans\fP
|
||||
.TP 2
|
||||
*
|
||||
\f4Personal\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
-
|
||||
\f3calendar\fP
|
||||
.TP 2
|
||||
-
|
||||
\f3schedule\fP
|
||||
.RE
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
この例で、\f3plans\fPはオブジェクト参照、\f3Personal\fPは\f3calendar\fPと\f3schedule\fPの2つのオブジェクト参照を含むネーミング・コンテキストです。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.util.Properties;
|
||||
.fl
|
||||
import org.omg.CORBA.*;
|
||||
.fl
|
||||
import org.omg.CosNaming.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class NameClient
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
public static void main(String args[])
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
try {
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
前述のJava IDL一時ネーム・サービスの起動で、ネーム・サーバーはポート1050を使用して起動しました。次のコードで、このポート番号をクライアント・システムに知らせます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、初期ネーミング・コンテキストを取得し、それを\f3ctx\fPに代入します。2行目では、\f3ctx\fPをダミーのオブジェクト参照\f3objref\fPにコピーします。このobjrefには、あとで様々な名前を割り当てて名前空間に追加します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NamingContext ctx =
|
||||
.fl
|
||||
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
|
||||
.fl
|
||||
NamingContext objref = ctx;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、textタイプの名前plansを作成し、それをダミーのオブジェクト参照にバインドします。その後、\f2rebind\fPを使用して初期ネーミング・コンテキストの下にplansを追加しています。\f2rebind\fPメソッドを使用すれば、\f2bind\fPを使用した場合に発生する例外を発生させずに、このプログラムを何度も繰返し実行できます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc1 = new NameComponent("plans", "text");
|
||||
.fl
|
||||
NameComponent[] name1 = {nc1};
|
||||
.fl
|
||||
ctx.rebind(name1, objref);
|
||||
.fl
|
||||
System.out.println("plans rebind successful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、directoryタイプのPersonalというネーミング・コンテキストを作成します。その結果得られるオブジェクト参照\f3ctx2\fPをこの名前にバインドし、初期ネーミング・コンテキストに追加します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc2 = new NameComponent("Personal", "directory");
|
||||
.fl
|
||||
NameComponent[] name2 = {nc2};
|
||||
.fl
|
||||
NamingContext ctx2 = ctx.bind_new_context(name2);
|
||||
.fl
|
||||
System.out.println("new naming context added..");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
残りのコードでは、ダミーのオブジェクト参照をscheduleとcalendarという名前でネーミング・コンテキスト「Personal」(\f3ctx2\fP)にバインドします。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc3 = new NameComponent("schedule", "text");
|
||||
.fl
|
||||
NameComponent[] name3 = {nc3};
|
||||
.fl
|
||||
ctx2.rebind(name3, objref);
|
||||
.fl
|
||||
System.out.println("schedule rebind successful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
NameComponent nc4 = new NameComponent("calender", "text");
|
||||
.fl
|
||||
NameComponent[] name4 = {nc4};
|
||||
.fl
|
||||
ctx2.rebind(name4, objref);
|
||||
.fl
|
||||
System.out.println("calender rebind successful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
|
||||
.fl
|
||||
} catch (Exception e) {
|
||||
.fl
|
||||
e.printStackTrace(System.err);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "サンプル・クライアント: 名前空間のブラウズ"
|
||||
.LP
|
||||
.LP
|
||||
次のサンプル・プログラムでは、名前空間をブラウズする方法を示します。
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.util.Properties;
|
||||
.fl
|
||||
import org.omg.CORBA.*;
|
||||
.fl
|
||||
import org.omg.CosNaming.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class NameClientList
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
public static void main(String args[])
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
try {
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
前述のJava IDL一時ネーム・サービスの起動で、ネーム・サーバーはポート1050を使用して起動しました。次のコードで、このポート番号をクライアント・システムに知らせます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、初期ネーミング・コンテキストを取得しています。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NamingContext nc =
|
||||
.fl
|
||||
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
\f2list\fPメソッドは、ネーミング・コンテキストのバインディングをリストします。この場合、最大1000個までのバインディングが初期ネーミング・コンテキストからBindingListHolderに返されます。残りのバインディングは、BindingIteratorHolderに返されます。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
BindingListHolder bl = new BindingListHolder();
|
||||
.fl
|
||||
BindingIteratorHolder blIt= new BindingIteratorHolder();
|
||||
.fl
|
||||
nc.list(1000, bl, blIt);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
次のコードでは、返されたBindingListHolderからバインディングの配列を取得します。バインディングがない場合は、プログラムが終了します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Binding bindings[] = bl.value;
|
||||
.fl
|
||||
if (bindings.length == 0) return;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
残りのコードでは、バインディングに対してループ処理を行い、名前を出力します。
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
for (int i=0; i < bindings.length; i++) {
|
||||
.fl
|
||||
|
||||
.fl
|
||||
// get the object reference for each binding
|
||||
.fl
|
||||
org.omg.CORBA.Object obj = nc.resolve(bindings[i].binding_name);
|
||||
.fl
|
||||
String objStr = orb.object_to_string(obj);
|
||||
.fl
|
||||
int lastIx = bindings[i].binding_name.length\-1;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
// check to see if this is a naming context
|
||||
.fl
|
||||
if (bindings[i].binding_type == BindingType.ncontext) {
|
||||
.fl
|
||||
System.out.println( "Context: " +
|
||||
.fl
|
||||
bindings[i].binding_name[lastIx].id);
|
||||
.fl
|
||||
} else {
|
||||
.fl
|
||||
System.out.println("Object: " +
|
||||
.fl
|
||||
bindings[i].binding_name[lastIx].id);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
|
||||
.fl
|
||||
} catch (Exception e) {
|
||||
.fl
|
||||
e.printStackTrace(System.err);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH unpack200 1 "05 Jul 2012"
|
||||
|
||||
.LP
|
||||
.SH "名前"
|
||||
unpack200 \- JARアンパック・ツール
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
形式
|
||||
.TP 2
|
||||
o
|
||||
説明
|
||||
.TP 2
|
||||
o
|
||||
オプション
|
||||
.TP 2
|
||||
o
|
||||
終了ステータス
|
||||
.TP 2
|
||||
o
|
||||
関連項目
|
||||
.TP 2
|
||||
o
|
||||
注意
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "形式"
|
||||
.LP
|
||||
.LP
|
||||
\f4unpack200\fP\f2 [ \fP\f2options\fP ] \f2input\-file\fP \f2JAR\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
オプションの指定順序に決まりはありません。コマンドラインに指定された最後のオプションが、それ以前に指定されたすべてのオプションより優先されます。
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
input\-file
|
||||
入力ファイルの名前。pack200 gzipファイルかpack200ファイルを指定できます。この他に、0を設定すればpack200(1)から作成されたJARファイルも入力として使用できます。この場合、入力ファイルの内容がPack200マーカーとともに出力JARファイルにコピーされます。
|
||||
.TP 3
|
||||
JAR\-file
|
||||
出力JARファイル名。
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "説明"
|
||||
.LP
|
||||
.LP
|
||||
\f2unpack200\fPは、\f2pack200\fP(1)で作成されたパック・ファイルをJARファイルに変換するネイティブ実装です。一般的な使用方法:
|
||||
.LP
|
||||
.LP
|
||||
\f2% unpack200 myarchive.pack.gz myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
この例では、デフォルトの\f2unpack200\fPの設定で、\f2myarchive.pack.gz\fPから\f2myarchive.jar\fPが作成されます。
|
||||
.LP
|
||||
.SH "オプション"
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
JARファイル内のすべてのエントリに\f2true\fP、\f2false\fPまたは\f2keep\fPのデフレーションを設定します。デフォルト・モードは\f2keep\fPです。\f2true\fPまたは\f2false\fP場合、デフォルトの動作をオーバーライドして、出力JARファイル内のすべてのエントリのデフレーション・モードが設定されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-r \-\-remove\-pack\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
入力パック・ファイルを削除します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-v \-\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
最小限のメッセージを出力します。このオプションを複数指定すると、より長いメッセージが出力されます。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-q \-\-quiet\fP
|
||||
.LP
|
||||
.LP
|
||||
メッセージを表示せずに動作するように指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
|
||||
.LP
|
||||
.LP
|
||||
出力メッセージのログ・ファイルを指定します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-? \-h \-\-help\fP
|
||||
.LP
|
||||
.LP
|
||||
このコマンドに関するヘルプ情報を出力します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-V \-\-version\fP
|
||||
.LP
|
||||
.LP
|
||||
このコマンドに関するバージョン情報を出力します。
|
||||
.LP
|
||||
.LP
|
||||
\f4\-J\fP\f2option\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2unpack200\fPによって呼び出されるJava起動ツールに\f2option\fPを渡します。
|
||||
.LP
|
||||
.SH "終了ステータス"
|
||||
.LP
|
||||
.LP
|
||||
次の終了値が返されます。
|
||||
.LP
|
||||
.LP
|
||||
\f2\ 0\fP: 正常終了した場合
|
||||
.LP
|
||||
.LP
|
||||
\f2>0\fP: エラーが発生した場合
|
||||
.LP
|
||||
.SH "関連項目"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
pack200(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java SEのドキュメント\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/index.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Javaデプロイメント・ガイド \- Pack200\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
|
||||
.TP 2
|
||||
o
|
||||
jar(1) \- Java Archiveツール
|
||||
.TP 2
|
||||
o
|
||||
jarsigner(1) \- JAR署名ツール
|
||||
.TP 2
|
||||
o
|
||||
\f2attributes(5)\fPのマニュアル・ページ
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "注意"
|
||||
.LP
|
||||
.LP
|
||||
このコマンドと\f2unpack(1)\fPを混同しないでください。これらは別製品です。
|
||||
.LP
|
||||
.LP
|
||||
JDKに付属するJava SE API仕様との相違が見つかった場合には、仕様を優先してください。
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,662 @@
|
||||
." Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH java 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
java \- the Java application launcher
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\fP\f3java\fP [ \f2options\fP ] \f2class\fP [ \f2argument ...\fP ]
|
||||
.fl
|
||||
\f3java\fP [ \f2options\fP ] \f3\-jar\fP \f2file.jar\fP [ \f2argument ...\fP ]
|
||||
.fl
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options. See \f2Options\fP.
|
||||
.TP 3
|
||||
class
|
||||
The name of the class to be called.
|
||||
.TP 3
|
||||
file.jar
|
||||
The name of the JAR file to be called. Used only with the \f3\-jar\fP command.
|
||||
.TP 3
|
||||
argument
|
||||
The arguments passed to the \f3main\fP function.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3java\fP command starts a Java application. It does this by starting a Java runtime environment, loading a specified class, and calling that class's \f3main\fP method.
|
||||
.LP
|
||||
.LP
|
||||
The method must be declared public and static, it must not return any value, and it must accept a String array as a parameter. The method declaration has the following form:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
public static void main(String args[])
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
By default, the first argument without an option is the name of the class to be called. A fully qualified class name should be used. If the \f3\-jar\fP option is specified, then the first non\-option argument is the name of a JAR file containing class and resource files for the application, with the startup class indicated by the Main\-Class manifest header.
|
||||
.LP
|
||||
.LP
|
||||
The Java runtime searches for the startup class, and other classes used, in three sets of locations: the bootstrap class path, the installed extensions, and the user class path.
|
||||
.LP
|
||||
.LP
|
||||
Non\-option arguments after the class name or JAR file name are passed to the \f3main\fP function.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
The launcher has a set of standard options that are supported in the current runtime environment.
|
||||
.LP
|
||||
.LP
|
||||
In addition, the current implementations of the virtual machines support a set of nonstandard options that are subject to change in future releases. See \f2Nonstandard Options\fP.
|
||||
.LP
|
||||
.SS
|
||||
Standard Options
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-client
|
||||
Selects the Java HotSpot Client VM. A 64\-bit capable JDK currently ignores this option and instead uses the Java Hotspot Server VM.
|
||||
.br
|
||||
.br
|
||||
For default Java VM selection, see \f2Server\-Class Machine Detection\fP at http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server\-class.html
|
||||
.TP 3
|
||||
\-server
|
||||
Selects the Java HotSpot Server VM. On a 64\-bit capable JDK, only the Java Hotspot Server VM is supported so the \f3\-\fP\f3server\fP option is implicit.
|
||||
.br
|
||||
.br
|
||||
For default a Java VM selection, see \f2Server\-Class Machine Detection\fP at http://docs.oracle.com/javase/7/docs/technotes/guides/vm/server\-class.html
|
||||
.TP 3
|
||||
\-agentlib:libname[=options]
|
||||
Loads native agent library \f2libname\fP, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-agentlib:hprof
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\-agentlib:jdwp=help
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\-agentlib:hprof=help
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
See \f2JVMTI Agent Command\-Line Options\fP at http://docs.oracle.com/javase/7/docs/platform/jvmti/jvmti.html#starting/dd>
|
||||
.TP 3
|
||||
\-agentpath:pathname[=options]
|
||||
Loads a native agent library by full \f2pathname\fP. See \f2JVMTI Command\-Line Options\fP at http://docs.oracle.com/javase/7/docs/platform/jvmti/jvmti.html#starting
|
||||
.TP 3
|
||||
\-classpath classpath, \-cp classpath
|
||||
Specifies a list of directories, JAR files, and ZIP archives to search for class files. Separate class path entries with colons (:). Specifying \f3\-classpath\fP or \f3\-cp\fP overrides any setting of the \f2CLASSPATH\fP environment variable.
|
||||
.br
|
||||
.br
|
||||
If \f3\-classpath\fP and \f3\-cp\fP are not used and \f2CLASSPATH\fP is not set, then the user class path consists of the current directory (.).
|
||||
.br
|
||||
.br
|
||||
As a special convenience, a class path element that contains a base name of \f3*\fP is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR. A Java program cannot tell the difference between the two invocations.
|
||||
.br
|
||||
.br
|
||||
For example, if directory mydir contains a.jar and b.JAR, then the class path element \f3mydir/*\fP is expanded to a A.jar:b.JAR, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A class path entry consisting simply of \f3*\fP expands to a list of all the jar files in the current directory. The \f2CLASSPATH\fP environment variable, where defined, will be similarly expanded. Any class path wildcard expansion occurs before the Java VM is started. No Java program will ever see wild cards that are not expanded except by querying the environment. For example, by calling \f3System.getenv("CLASSPATH")\fP.
|
||||
.TP 3
|
||||
\-Dproperty=value
|
||||
Sets a system property value.
|
||||
.TP 3
|
||||
\-d32
|
||||
Run the application in a 32\-bit environment. If a 32\-bit environment is not installed or is not supported, an error will be reported. By default, the application is run in a 32\-bit environment unless a 64\-bit only system is used.
|
||||
.TP 3
|
||||
\-d64
|
||||
Run the application in a 64\-bit environment. If a 64\-bit environment is not installed or is not supported, an error will be reported. By default, the application is run in a 32\-bit environment unless a 64\-bit only system is used.
|
||||
.br
|
||||
.br
|
||||
Currently only the Java HotSpot Server VM supports 64\-bit operation, and the \f3\-server\fP option is implicit with the use of \f3\-d64\fP. The \f3\-client\fP option is ignored with the use of \f3\-d64\fP. This is subject to change in a future release.
|
||||
.TP 3
|
||||
\-disableassertions[:package name"..." | :class name ], \-da[:package name"..." | :class name ]
|
||||
Disable assertions. This is the default.
|
||||
.br
|
||||
.br
|
||||
With no arguments, \f3\-disableassertions\fP or \f3\-da\fP disables assertions. With one argument ending in \f3"..."\fP, the switch disables assertions in the specified package and any subpackages. If the argument is \f3"..."\fP, then the switch disables assertions in the unnamed package in the current working directory. With one argument not ending in \f3"..."\fP, the switch disables assertions in the specified class.
|
||||
.br
|
||||
.br
|
||||
To run a program with assertions enabled in \f3package com.wombat.fruitbat\fP but disabled in class \f3com.wombat.fruitbat.Brickbat\fP, the following command could be used:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java \-ea:com.wombat.fruitbat... \-da:com.wombat.fruitbat.Brickbat <Main Class>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
The \f3\-disableassertions\fP and \f3\-da\fP switches apply to all class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do not apply to system. This makes it easy to turn on asserts in all classes except for system classes. The \f3\-disablesystemassertions\fP option provides a separate swith to enable assertions in all system classes.
|
||||
.TP 3
|
||||
\-enableassertions[:package name"..." | :class name ], \-ea[:package name"..." | :class name ]
|
||||
Enable assertions. Assertions are disabled by default.
|
||||
.br
|
||||
.br
|
||||
With no arguments, \f3\-enableassertions\fP or \f3\-ea\fP enables assertions. With one argument ending in \f3"..."\fP, the switch enables assertions in the specified package and any subpackages. If the argument is \f3"..."\fP, then the switch enables assertions in the unnamed package in the current working directory. With one argument not ending in \f3"..."\fP, the switch enables assertions in the specified class.
|
||||
.br
|
||||
.br
|
||||
If a single command contains multiple instances of these switches, then they are processed in order before loading any classes. So, for example, to run a program with assertions enabled only in package com.wombat.fruitbat (and any subpackages), the following command could be used:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java \-ea:com.wombat.fruitbat... <Main Class>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
The \f3\-enableassertions\fP and \f3\-ea\fP switches apply to all class loaders and to system classes (which do not have a class loader). There is one exception to this rule: in their no\-argument form, the switches do not apply to system. This makes it easy to turn on asserts in all classes except for system classes. The \f3\-enablesystemassertions\fP option provides a separate switch to enable assertions in all system classes.
|
||||
.TP 3
|
||||
\-enablesystemassertions, \-esa
|
||||
Enable assertions in all system classes (sets the default assertion status for system classes to true).
|
||||
.TP 3
|
||||
\-disablesystemassertions, \-dsa
|
||||
Disables assertions in all system classes.
|
||||
.TP 3
|
||||
\-help or \-?
|
||||
Displays usage information and exit.
|
||||
.TP 3
|
||||
\-jar
|
||||
Executes a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. For this option to work, the manifest of the JAR file must contain a line in the form \f3Main\-Class\fP: \f2classname\fP. Here, \f2classname\fP identifies the class with the \f3public static void main(String[] args)\fP method that serves as your application's starting point.
|
||||
.br
|
||||
.br
|
||||
When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.
|
||||
.br
|
||||
.br
|
||||
JAR files that can be run with the \f3java \-jar\fP option can have their execute permissions set so they can be run without using \f3java \-jar\fP. See \f2JAR File Overview\fP at http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jarGuide.html
|
||||
.TP 3
|
||||
\-javaagent:jarpath[=options]
|
||||
Loads a Java programming language agent. For more information about instrumenting Java applications, see the java.lang.instrument package description in the Java API documentation at
|
||||
.br
|
||||
.na
|
||||
\f2http://docs.oracle.com/javase/7/docs/api/java/lang/instrument/package\-summary.html\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/api/java/lang/instrument/package\-summary.html
|
||||
.TP 3
|
||||
\-jre\-restrict\-search
|
||||
Includes user\-private JREs in the version search.
|
||||
.TP 3
|
||||
\-no\-jre\-restrict\-search
|
||||
Excludes user\-private JREs in the version search.
|
||||
.TP 3
|
||||
\-showversion
|
||||
Displays version information and continues.
|
||||
.TP 3
|
||||
\-splash:imagepath
|
||||
Shows splash screen with image specified by \f2imagepath\fP.
|
||||
.TP 3
|
||||
\-verbose, \-verbose:class
|
||||
Displays information about each class loaded.
|
||||
.TP 3
|
||||
\-verbose:gc
|
||||
Reports on each garbage collection event.
|
||||
.TP 3
|
||||
\-verbose:jni
|
||||
Reports information about use of native methods and other Java Native Interface activity.
|
||||
.TP 3
|
||||
\-version
|
||||
Displays version information and exits. See also the \f3\-showversion\fP option.
|
||||
.TP 3
|
||||
\-version:release
|
||||
Specifies that the version specified by the release is required by the class or JAR file specified on the command line. If the version of the \f3java\fP command called does not meet this specification and an appropriate implementation is found on the system, then the appropriate implementation will be used.
|
||||
.br
|
||||
.br
|
||||
The \f3release\fP option specifies an exact version and a list of versions called a version string. A version string is an ordered list of version ranges separated by spaces. A version range is either a \f2version\-id\fP, a \f2version\-id\fP followed by an asterisk (\f3*\fP), a \f2version\-id\fP followed by a plus sign (\f3+\fP), or a version range that consists of two \f2version\-ids\fP combined using an ampersand (\f3&\fP). The asterisk means prefix match, the plus sign means this version or greater, and the ampersand means the logical \f3and\fP of the two version\-ranges, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-version:"1.6.0_13 1.6*&1.6.0_10+"
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
The meaning of the previous example is that the class or JAR file requires either version 1.6.0_13, or a version with 1.6 as a \f2version\-id\fP prefix and that is not less than 1.6.0_10. The exact syntax and definition of version strings can be found in Appendix A of the \f2Java Network Launching Protocol & API Specification (JSR\-56)\fP.
|
||||
.br
|
||||
.br
|
||||
For JAR files, the preference is to specify version requirements in the JAR file manifest rather than on the command line.
|
||||
.br
|
||||
.br
|
||||
See \f2Notes\fP for important policy information on the use of this option.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Non\-Standard Options
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-X
|
||||
Displays information about nonstandard options and exits.
|
||||
.TP 3
|
||||
\-Xint
|
||||
Operates in interpreted\-only mode. Compilation to native code is disabled, and all bytecode is executed by the interpreter. The performance benefits offered by the Java HotSpot Client VM adaptive compiler is not present in this mode.
|
||||
.TP 3
|
||||
\-Xbatch
|
||||
Disables background compilation. Typically, the Java VM compiles the method as a background task, running the method in interpreter mode until the background compilation is finished. The \-Xbatch flag disables background compilation so that compilation of all methods proceeds as a foreground task until completed.
|
||||
.TP 3
|
||||
\-Xbootclasspath:bootclasspath
|
||||
Specifies a colon\-separated list of directories, JAR files, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java platform JDK.
|
||||
.br
|
||||
.br
|
||||
Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed because doing so would contravene the Java Runtime Environment binary code license.
|
||||
.TP 3
|
||||
\-Xbootclasspath/a:path
|
||||
Specifies a colon\-separated path of directories, JAR files, and ZIP archives to append to the default bootstrap class path.
|
||||
.TP 3
|
||||
\-Xbootclasspath/p:path
|
||||
Specifies a colon\-separated path of directories, JAR files, and ZIP archives to add in front of the default bootstrap class path.
|
||||
.br
|
||||
.br
|
||||
Do not deploy applications that use this option to override a class in rt.jar because this violates the Java Runtime Environment binary code license.
|
||||
.TP 3
|
||||
\-Xcheck:jni
|
||||
Performs additional checks for Java Native Interface (JNI) functions. Specifically, the Java Virtual Machine validates the parameters passed to the JNI function and the runtime environment data before processing the JNI request. Any invalid data encountered indicates a problem in the native code, and the Java Virtual Machine will terminate with a fatal error in such cases. Expect a performance degradation when this option is used.
|
||||
.TP 3
|
||||
\-Xfuture
|
||||
Performs strict class\-file format checks. For backward compatibility, the default format checks performed by the Java virtual machine are no stricter than the checks performed by 1.1.x versions of the JDK software. The \f3\-Xfuture\fP option turns on stricter class\-file format checks that enforce closer conformance to the class\-file format specification. Developers are encouraged to use this flag when developing new code because the stricter checks will become the default in future releases of the Java application launcher.
|
||||
.TP 3
|
||||
\-Xnoclassgc
|
||||
Disables class garbage collection. Use of this option preven memory recovery from loaded classes thus increasing overall memory usage. This could cause \f3OutOfMemoryError\fP to be thrown in some applications.
|
||||
.TP 3
|
||||
\-Xincgc
|
||||
Enables the incremental garbage collector. The incremental garbage collector, which is turned off by default, will reduce the occasional long garbage\-collection pauses during program execution. The incremental garbage collector will at times execute concurrently with the program and during such times will reduce the processor capacity available to the program.
|
||||
.TP 3
|
||||
\-Xloggc:file
|
||||
Reports on each garbage collection event, as with \f3\-verbose:gc\fP, but logs this data to a file. In addition to the information \f3\-verbose:gc\fP gives, each reported event will be preceded by the time (in seconds) since the first garbage\-collection event.
|
||||
.br
|
||||
.br
|
||||
Always use a local file system for storage of this file to avoid stalling the Java VM due to network latency. The file may be truncated in the case of a full file system and logging will continue on the truncated file. This option overrides \f3\-verbose:gc\fP when both are specified on the command line.
|
||||
.TP 3
|
||||
\-Xmnsize or \-XX:NewSize
|
||||
Sets the size of the young generation (nursery).
|
||||
.TP 3
|
||||
\-Xmsn
|
||||
Specifies the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1 MB. Append the letter \f3k\fP or \f3K\fP to indicate kilobytes, or \f3m\fP or \f3M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration. See \f2Garbage Collector Ergonomics\fP at http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc\-ergonomics.html
|
||||
.br
|
||||
.br
|
||||
Examples:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-Xms6291456
|
||||
.fl
|
||||
\-Xms6144k
|
||||
.fl
|
||||
\-Xms6m
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-Xmxn
|
||||
Specifies the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2 MB. Append the letter \f3k\fP or \f3K\fP to indicate kilobytes, or \f3m\fP or \f3M\fP to indicate megabytes. The default value is chosen at runtime based on system configuration.
|
||||
.br
|
||||
.br
|
||||
For server deployments, \f3\-Xms\fP and \f3\-Xmx\fP are often set to the same value. See \f2Garbage Collector Ergonomics\fP at http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc\-ergonomics.html
|
||||
.br
|
||||
.br
|
||||
Examples:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-Xmx83886080
|
||||
.fl
|
||||
\-Xmx81920k
|
||||
.fl
|
||||
\-Xmx80m
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
On Solaris 7 and Solaris 8 SPARC platforms, the upper limit for this value is approximately 4000 m minus overhead amounts. On Solaris 2.6 and x86 platforms, the upper limit is approximately 2000 m minus overhead amounts. On Linux platforms, the upper limit is approximately 2000 m minus overhead amounts.
|
||||
.TP 3
|
||||
\-Xprof
|
||||
Profiles the running program, and sends profiling data to standard output. This option is provided as a utility that is useful in program development and is not intended to be used in production systems.
|
||||
.TP 3
|
||||
\-Xrs
|
||||
Reduces use of operating\-system signals by the Java VM.
|
||||
.br
|
||||
.br
|
||||
In an earlier release, the Shutdown Hooks facility was added to enable orderly shutdown of a Java application. The intent was to enable user cleanup code (such as closing database connections) to run at shutdown, even if the Java VM terminates abruptly.
|
||||
.br
|
||||
.br
|
||||
The Java VM catches signals to implement shutdown hooks for unexpected Java VM termination. The Java VM uses \f3SIGHUP\fP, \f3SIGINT\fP, and \f3SIGTERM\fP to initiate the running of shutdown hooks.
|
||||
.br
|
||||
.br
|
||||
The JVM uses a similar mechanism to implement the feature of dumping thread stacks for debugging purposes. The JVM uses \f3SIGQUIT\fP to perform thread dumps.
|
||||
.br
|
||||
.br
|
||||
Applications embedding the Java VM frequently need to trap signals such as \f3SIGINT\fP or \f3SIGTERM\fP, which can lead to interference with the Java VM signal handlers. The \f3\-Xrs\fP command\-line option is available to address this issue. When \f3\-Xrs\fP is used on the Java VM, the signal masks for \f3SIGINT\fP, \f3SIGTERM\fP, \f3SIGHUP\fP, and \f3SIGQUIT\fP are not changed by the Java VM, and signal handlers for these signals are not installed.
|
||||
.br
|
||||
.br
|
||||
There are two consequences of specifying \f3\-Xrs\fP:
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f3SIGQUIT\fP thread dumps are not available.
|
||||
.TP 2
|
||||
o
|
||||
User code is responsible for causing shutdown hooks to run, for example by calling \f3System.exit()\fP when the Java VM is to be terminated.
|
||||
.RE
|
||||
.TP 3
|
||||
\-Xssn
|
||||
Sets the thread stack size.
|
||||
.TP 3
|
||||
\-XX:AllocationPrefetchStyle=n
|
||||
Sets the style of prefetch used during allocation. default=2.
|
||||
.TP 3
|
||||
\-XX:+AggressiveOpts
|
||||
Enables aggressive optimization.
|
||||
.TP 3
|
||||
\-XX:+|\-DisableAttachMechanism
|
||||
Specifies whether commands (such as \f3jmap\fP and \f3jconsole\fP) can attach to the Java VM. By default, this feature is disabled. That is, attaching is enabled, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java \-XX:+DisableAttachMechanism
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-XX:+|\-FlightRecorder
|
||||
Toggles the use of the Java Flight Recorder (JFR) during the runtime of the application. This is a commercial feature that requires you to also specify the \f3\-XX:+UnlockCommercialFeatures\fP option as follows:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java \-XX:+UnlockCommercialFeatures \-XX:+FlightRecorder
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-XX:FlightRecorderOptions=parameter=value
|
||||
Sets the parameters that control the behavior of JFR. This option can be used only when JFR is enabled (that is, the \f3\-XX:+FlightRecorder\fP option is specified).
|
||||
.br
|
||||
.br
|
||||
The following list contains all available JFR parameters:
|
||||
.RS 3
|
||||
.TP 3
|
||||
defaultrecording=true|false
|
||||
Specifies whether background recording is enabled. By default, this parameter is set to \f3false\fP (background recording is disabled). To enable it, set the parameter to \f3true\fP.
|
||||
.TP 3
|
||||
disk=true|false
|
||||
Specifies whether JFR should write a continuous recording to disk. By default, this parameter is set to \f3false\fP (continuous recording to disk is disabled). To enable it, set the parameter to \f3true\fP.
|
||||
.TP 3
|
||||
dumponexit=true|false
|
||||
Specifies whether a dump file of JFR data should be generated when the JVM terminates in a controlled manner. By default, this parameter is set to \f3false\fP (dump file on exit is not generated). To enable it, set the parameter to \f3true\fP.
|
||||
.br
|
||||
.br
|
||||
The dump file is written to the location defined by the \f3dumponexitpath\fP parameter.
|
||||
.TP 3
|
||||
dumponexitpath=path
|
||||
Specifies the path and name of the dump file with JFR data that is created when the JVM exits in a controlled manner if you set the \f3dumponexit=true\fP parameter.If the specified path is a directory, the JVM assigns a file name that shows the creation date and time. If the specified path includes a file name and if that file already exists, the JVM creates a new file by appending the date and time stamp to the specified file name.
|
||||
.TP 3
|
||||
globalbuffersize=size
|
||||
Specifies the total amount of primary memory (in MB) used for data retention. By default, the size is set to 10 MB.
|
||||
.TP 3
|
||||
maxage=time
|
||||
Specifies the maximum age (in minutes) of disk data for default recording. By default, the maximum age is set to 15 minutes.This parameter is valid only if you set the \f3disk=true\fP parameter.
|
||||
.TP 3
|
||||
maxchunksize=size
|
||||
Specifies the maximum size (in MB) of the data chunks in a recording. By default, the maximum size of data chunks is set to 12 MB.
|
||||
.TP 3
|
||||
maxsize=size
|
||||
Specifies the maximum size (in MB) of disk data for default recording. By default, the maximum size of disk data is not limited.
|
||||
.br
|
||||
.br
|
||||
This parameter is valid only if you set the \f3disk=true\fP parameter.
|
||||
.TP 3
|
||||
repository=path
|
||||
Specifies the repository (a directory) for temporary disk storage. By default, the system’s temporary directory is used.
|
||||
.TP 3
|
||||
settings=path
|
||||
Specifies the path and name of the event settings file (of type JFS). By default, the \f3default.jfs\fP file is used, which is located in \f3JAVA_HOME/jre/lib/jfr\fP.
|
||||
.TP 3
|
||||
threadbuffersize=size
|
||||
Specifies the per\-thread local buffer size (in KB). Higher values for this parameter allow more data gathering without contention to flush it to the global storage. It can increase application footprint in a thread\-rich environment. By default, the local buffer size is set to 5 KB.
|
||||
.br
|
||||
.br
|
||||
You can specify values for multiple parameters by separating them with a comma. For example, to instruct JFR to write a continuous recording to disk, and set the maximum size of data chunks to 10 MB, specify the following:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-XX:FlightRecorderOptions=disk=true,maxchunksize=10M
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
.TP 3
|
||||
\-XXLargePageSizeInBytes=n
|
||||
Specifies the maximum size for large pages.
|
||||
.TP 3
|
||||
\-XX:MaxGCPauseMillis=n
|
||||
Sets a target for the maximum GC pause time. This is a soft goal, and the Java VM will make its best effort to achieve it. There is no maximum value set by default.
|
||||
.TP 3
|
||||
\-XX:NewSize
|
||||
Sets the size of the young generation (nursery). Sames as \f3\-Xmnsize\fP.
|
||||
.TP 3
|
||||
\-XX:ParallelGCThreads=n
|
||||
Sets the number of GC threads in the parallel collectors.
|
||||
.TP 3
|
||||
\-XX:PredictedClassLoadCount=n
|
||||
This option requires that the \f3UnlockExperimentalVMOptions\fP flag be set first. Use the \f3PredictedClassLoadCount\fP flag if your application loads a lot of classes and especially if \f3class.forName()\fP is used heavily. The recommended value is the number of classes loaded as shown in the output from \f3\-verbose:class\fP.
|
||||
.br
|
||||
.br
|
||||
Example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java \-XX:+UnlockExperimentalVMOptions \-XX:PredictedClassLoadCount=60013
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-XX:+PrintCompilation
|
||||
Prints verbose output from the Java HotSpot VM dynamic runtime compiler.
|
||||
.TP 3
|
||||
\-XX:+PrintGCDetails \-XX:+PrintGCTimeStamps
|
||||
Prints garbage collection output along with time stamps.
|
||||
.TP 3
|
||||
\-XX:SoftRefLRUPolicyMSPerMB=0
|
||||
This flag enables aggressive processing of software references. Use this flag if the software reference count has an impact on the Java HotSpot VM garbage collector.
|
||||
.TP 3
|
||||
\-XX:StartFlightRecording=parameter=value
|
||||
Starts a JFR recording for the Java application. This option is equivalent to the \f3start_flightrecording\fP diagnostic command that starts JFR at runtime. You can set the following parameters when starting a JFR recording:
|
||||
.RS 3
|
||||
.TP 3
|
||||
compress=true|false
|
||||
Specifies whether to compress the JFR recording log file (of type JFR) on the disk using the \f3gzip\fP file compression utility. This parameter is valid only if the \f3filename\fP parameter is specified. By defaut it is set to \f3false\fP (recoding is not compressed). To enable compression, set the parameter to \f3true\fP.
|
||||
.TP 3
|
||||
defaultrecording=true|false
|
||||
Specifies whether the recording is continuous or it runs for a limited time. By default, this parameter is set to \f3false\fP (recording runs for a limited time). To make the recording run continuously, set the parameter to \f3true\fP.
|
||||
.TP 3
|
||||
delay=time
|
||||
Specifies the delay (in milliseconds) between the Java application launch time and the start of the recording. By default, there is no delay and this parameter is set to 0.
|
||||
.TP 3
|
||||
duration=time
|
||||
Specifies the duration (in milliseconds) of the recording. By default, the duration is not limited.
|
||||
.TP 3
|
||||
filename=path
|
||||
Specifies the path and name of the JFR recording log file.
|
||||
.TP 3
|
||||
name=identifier
|
||||
Specifies the identifier for the JFR recording. By default, it is set to Recording x
|
||||
.TP 3
|
||||
maxage=time
|
||||
Specifies the maximum age (in minutes) of disk data for default recording. By default, the maximum age is set to 15 minutes.
|
||||
.TP 3
|
||||
maxsize=size
|
||||
Specifies the maximum size (in MB) of the recording before it is flushed from the thread buffer to the global buffer. By default, the maximum size is not limited.
|
||||
.br
|
||||
.br
|
||||
This parameter is valid only for size\-bound recordings.
|
||||
.TP 3
|
||||
settings=path
|
||||
Specifies the path and name of the event settings file (of type JFS). By default, the \f3default.jfs\fP file is used, which is located in \f3JAVA_HOME/jre/lib/jfr\fP.
|
||||
.RE
|
||||
You can specify values for multiple parameters by separating them with a comma. For example, to save the recording to test.jfr in the current working directory, and instruct JFR to compress the log file, specify the following:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-XX:StartFlightRecording=filename=test.jfr,compress=true
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-XX:TLABSize=n
|
||||
Thread local allocation buffers (TLAB) are enabled by default in the Java HotSpot VM. The Java HotSpot VM sizes TLABs based on allocation patterns. The \f3\-XX:TLABSize\fP option enables fine\-tuning the size of TLABs.
|
||||
.TP 3
|
||||
\-XX:+UnlockCommercialFeatures
|
||||
Use this flag to actively unlock the use of commercial features. Commercial features are the products Oracle Java SE Advanced or Oracle Java SE Suite, as defined at the Java SE Products web page.
|
||||
.br
|
||||
.br
|
||||
If this flag is not specified, then the default is to run the Java Virtual Machine without the commercial features being available. After they are enabled, it is not possible to disable their use at runtime.
|
||||
.TP 3
|
||||
\-XX:+UseAltSigs
|
||||
The Java VM uses \f3SIGUSR1\fP and \f3SIGUSR2\fP by default, which can sometimes conflict with applications that signal\-chain \f3SIGUSR1\fP and \f3SIGUSR2\fP. The \f3\-XX:+UseAltSigs\fP option causes the Java VM to use signals other than \f3SIGUSR1\fP and \f3SIGUSR2\fP as the default.
|
||||
.TP 3
|
||||
\-XX:+|\-UseCompressedOops
|
||||
Enables compressed references in 64\-bit Java VMs.
|
||||
.br
|
||||
.br
|
||||
This option is true by default.
|
||||
.TP 3
|
||||
\-XX:+UseConcMarkSweepGC or \-XX:+UseG1GC
|
||||
Enables either the Concurrent Mark Sweep (CMS) or the G1 garbage collectors.
|
||||
.TP 3
|
||||
\-XX:+|\-UseLargePages
|
||||
Enables large page support.
|
||||
.br
|
||||
.br
|
||||
Large pages are enabled by default on Solaris.
|
||||
.TP 3
|
||||
\-XX:+UseParallelOldGC
|
||||
Enables the parallel garbage collectors, which are optimized for throughput and average response time.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "NOTES"
|
||||
.LP
|
||||
.LP
|
||||
The \f2\-version:release\fP option places no restrictions on the complexity of the release specification. However, only a restricted subset of the possible release specifications represent sound policy and only these are fully supported. These policies are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
1.
|
||||
Any version, represented by not using this option.
|
||||
.TP 3
|
||||
2.
|
||||
Any version greater than an arbitrarily precise \f2version\-i\fPd value, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
"1.6.0_10+"
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
This would utilize any version greater than 1.6.0_10. This is useful for a case where an interface was introduced (or a bug fixed) in the release specified.
|
||||
.TP 3
|
||||
3.
|
||||
A version greater than an arbitrarily precise version\-id, bounded by the upper bound of that release family, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
"1.6.0_10+&1.6*"
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
4.
|
||||
An \f3or\fP expressions of items 2 or 3, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
"1.6.0_10+&1.6* 1.7+"
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
Similar to item 2. This is useful when a change was introduced in a release (1.7) but also made available in updates to earlier releases.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Performance Tuning Examples"
|
||||
.LP
|
||||
.LP
|
||||
The following examples show how to use experimental tuning flags to optimize either throughput or faster response time.
|
||||
.LP
|
||||
.SS
|
||||
Example 1, Tuning for Higher Throughput
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java \-d64 \-server \-XX:+AggressiveOpts \-XX:+UseLargePages \-Xmn10g \-Xms26g \-Xmx26g
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SS
|
||||
Example 2, Tuning for Lower Response Time
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java \-d64 \-XX:+UseG1GC \-Xms26g Xmx26g \-XX:MaxGCPauseMillis=500 \-XX:+PrintGCTimeStamps
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "EXIT STATUS"
|
||||
.LP
|
||||
.LP
|
||||
The following exit values are typically returned by the launcher, typically when the launcher is called with the wrong arguments, serious errors, or exceptions thrown from the Java Virtual Machine. However, a Java application may choose to return any value using the API call \f3System.exit(exitValue)\fP.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f30\fP: Successful completion
|
||||
.TP 2
|
||||
o
|
||||
\f3>0\fP: An error occurred
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
javac(1)
|
||||
.TP 2
|
||||
o
|
||||
jdb(1)
|
||||
.TP 2
|
||||
o
|
||||
javah(1)
|
||||
.TP 2
|
||||
o
|
||||
jar(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
." Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH javaws 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
\f2javaws\fP Command Line
|
||||
.LP
|
||||
.SH "NAME"
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws\fP \- Java Web Start launcher command
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws [run\-options] <jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2javaws [control\-options]\fP
|
||||
.LP
|
||||
.SH "PARAMETERS"
|
||||
.LP
|
||||
.LP
|
||||
\f2[run\-options]\fP
|
||||
.LP
|
||||
.LP
|
||||
Command\-line run\-options. run\-options may be in any order. For a discussion of the various run\-options, see RUN\-OPTIONS below.
|
||||
.LP
|
||||
.LP
|
||||
\f2<jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
This can be either the path of, or the Uniform Resource Locater (URL) of the JNLP (Java Network Launching Protocol) file.
|
||||
.LP
|
||||
.LP
|
||||
\f2[control\-options]\fP
|
||||
.LP
|
||||
.LP
|
||||
Command\-line control\-options. control\-options may be in any order. For a discussion of the various control\-options, see CONTROL\-OPTIONS below.
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f2javaws\fP command launches Java Web Start, which is the reference implementation of the Java Network Launching Protocol (JNLP). Java Web Start launches Java applications/applets hosted on a network.
|
||||
.LP
|
||||
.LP
|
||||
If a JNLP file is specified, \f2javaws\fP will launch the Java application/applet specified in the JNLP file.
|
||||
.LP
|
||||
.LP
|
||||
The \f2javaws\fP launcher has a set of options that are supported in the current release. However, the options may be removed in a future release.
|
||||
.LP
|
||||
.SH "RUN\-OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
\f2\-offline\fP
|
||||
.LP
|
||||
.LP
|
||||
Run Java Web Start in offline mode.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-Xnosplash\fP
|
||||
.LP
|
||||
.LP
|
||||
Do not display the initial splash screen.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-open <arguments>\fP
|
||||
.LP
|
||||
.LP
|
||||
If specified, replaces the arguments in the jnlp file with \f2\-open <arguments>\fP.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-print <arguments>\fP
|
||||
.LP
|
||||
.LP
|
||||
If specified, replaces the arguments in the jnlp file with \f2\-print <arguments>\fP.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-online\fP
|
||||
.LP
|
||||
.LP
|
||||
Use online mode (default behavior).
|
||||
.LP
|
||||
.LP
|
||||
\f2\-wait\fP
|
||||
.LP
|
||||
.LP
|
||||
If specified, the \f2javaws\fP process will not exit until the application exits. This option does not function as described on Windows platforms.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
Display additional output.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-J<option>\fP
|
||||
.LP
|
||||
.LP
|
||||
Supply options to the VM.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-system\fP
|
||||
.LP
|
||||
.LP
|
||||
Run the application from the system cache only.
|
||||
.LP
|
||||
.SH "CONTROL\-OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
\f2\-viewer\fP
|
||||
.LP
|
||||
.LP
|
||||
Show the Cache Viewer in the Java Control Panel.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-clearcache\fP
|
||||
.LP
|
||||
.LP
|
||||
Remove all non\-installed applications from the cache.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-userConfig <property name>\fP
|
||||
.LP
|
||||
.LP
|
||||
Clear the specified deployment property.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-userConfig <property name> <property value>\fP
|
||||
.LP
|
||||
.LP
|
||||
Set the specified deployment property to the specified value.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-uninstall\fP
|
||||
.LP
|
||||
.LP
|
||||
Remove all applications from the cache.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-uninstall <jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
Remove the application from the cache.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-import [import\-options] <jnlp>\fP
|
||||
.LP
|
||||
.LP
|
||||
Import the application to the cache.
|
||||
.LP
|
||||
.SH "IMPORT\-OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
\f2\-silent\fP
|
||||
.LP
|
||||
.LP
|
||||
Import silently (with no user interface).
|
||||
.LP
|
||||
.LP
|
||||
\f2\-system\fP
|
||||
.LP
|
||||
.LP
|
||||
Import application to the system cache.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-codebase <url>\fP
|
||||
.LP
|
||||
.LP
|
||||
Retrieve resources from the given codebase.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-shortcut\fP
|
||||
.LP
|
||||
.LP
|
||||
Install shortcuts as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used.
|
||||
.LP
|
||||
.LP
|
||||
\f2\-association\fP
|
||||
.LP
|
||||
.LP
|
||||
Install associations as if user allowed prompt. This option has no effect unless \f2\-silent\fP option is also used.
|
||||
.LP
|
||||
.SH "FILES"
|
||||
.LP
|
||||
.LP
|
||||
For information about the user and system cache and deployment.properties files, see
|
||||
.na
|
||||
\f2System\- and User\-Level Properties\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/properties.html.
|
||||
.LP
|
||||
.SH "MORE INFORMATION"
|
||||
.LP
|
||||
.LP
|
||||
For more information about Java Web Start, see
|
||||
.na
|
||||
\f2Java Web Start\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/index.html.
|
||||
.LP
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,349 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH orbd 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
orbd \- The Object Request Broker Daemon
|
||||
.LP
|
||||
.LP
|
||||
\f3orbd\fP is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment.
|
||||
.LP
|
||||
.LP
|
||||
\f3See also:\fP
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd <\fP\f3options\fP\f3>
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The Server Manager included with the \f3orbd\fP tool is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. The persistent servers, while publishing the persistent object references in the Naming Service, include the port number of the ORBD in the object reference instead of the port number of the Server. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
The object reference in the Naming Service remains independent of the server life cycle. For example, the object reference could be published by the server in the Naming Service when it is first installed, and then, independent of how many times the server is started or shutdown, the ORBD will always return the correct object reference to the invoking client.
|
||||
.TP 2
|
||||
o
|
||||
The client needs to lookup the object reference in the Naming Service only once, and can keep re\-using this reference independent of the changes introduced due to server life cycle.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To access ORBD's Server Manager, the server must be started using servertool(1), which is a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. For more information on the Server Manager, see the section in this document titled \f2Server Manager\fP.
|
||||
.LP
|
||||
.LP
|
||||
When \f2orbd\fP starts up, it also starts a naming service. For more information on the naming service, link to
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.SS
|
||||
Required Options
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-ORBInitialPort nameserverport
|
||||
Specifies the port on which the name server should be started. Once started, \f2orbd\fP will listen for incoming requests on this port. Note that when using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. (required)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.SS
|
||||
OTHER OPTIONS
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-port port
|
||||
Specifies the activation port where ORBD should be started, and where ORBD will be accepting requests for persistent objects. The default value for this port is 1049. This port number is added to the port field of the persistent Interoperable Object References (IOR). (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-defaultdb directory
|
||||
Specifies the base where the ORBD persistent storage directory \f2orb.db\fP is created. If this option is not specified, the default value is "./orb.db". (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverPollingTime milliseconds
|
||||
Specifies how often ORBD checks for the health of persistent servers registered via \f2servertool\fP. The default value is 1,000 ms. The value specified for \f2milliseconds\fP must be a valid positive integer. (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-serverStartupDelay milliseconds
|
||||
Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered via \f2servertool\fP is restarted. The default value is 1,000 ms. The value specified for \f2milliseconds\fP must be a valid positive integer. (optional)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine.
|
||||
.TP 3
|
||||
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Starting and Stopping the Naming Service"
|
||||
.LP
|
||||
.LP
|
||||
A Naming Service is a CORBA service that allows
|
||||
.na
|
||||
\f2CORBA objects\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#CORBA%20object to be named by means of binding a name to an object reference. The
|
||||
.na
|
||||
\f2name binding\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlGlossary.html#name%20binding may be stored in the naming service, and a client may supply the name to obtain the desired object reference.
|
||||
.LP
|
||||
.LP
|
||||
Prior to running a client or a server, you will start ORBD. ORBD includes a persistent Naming Service and a transient Naming Service, both of which are an implementation of the COS Naming Service.
|
||||
.LP
|
||||
.LP
|
||||
The \f4Persistent\fP\f3 Naming Service\fP provides persistence for naming contexts. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure. If ORBD is restarted, the Persistent Naming Service will restore the naming context graph, so that the binding of all clients' and servers' names remains intact (persistent).
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
For backward compatibility, \f2tnameserv\fP, a \f4Transient\fP\f3 Naming Service\fP shipped with older versions of the JDK, is also included in this release of J2SE. A transient naming service retains naming contexts as long as it is running. If there is a service interruption, the naming context graph is lost.
|
||||
.LP
|
||||
.LP
|
||||
The \f2\-ORBInitialPort\fP argument is a required command\-line argument for \f2orbd\fP, and is used to set the port number on which the Naming Service will run. The following instructions assume you can use port 1050 for the Java\ IDL Object Request Broker Daemon. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. You can substitute a different port if necessary.
|
||||
.LP
|
||||
.LP
|
||||
To start \f2orbd\fP from a UNIX command shell, enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
From an MS\-DOS system prompt (Windows), enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Now that ORBD is running, you can run your server and client applications. When running the client and server applications, they must be made aware of the port number (and machine name, if applicable) where the Naming Service is running. One way to do this is to add the following code to your application:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialHost", "MyHost");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
In this example, the Naming Service is running on port 1050 on host "MyHost". Another way is to specify the port number and/or machine name when running the server or client application from the command line. For example, you would start your "HelloApplication" with the following command line:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To stop the naming service, use the relevant operating system command, such as \f2pkill orbd\fP on Solaris, or \f2Ctrl+C\fP in the DOS window in which \f2orbd\fP is running. Note that names registered with the naming service may disappear when the service is terminated if the naming service is transient. The Java IDL naming service will run until it is explicitly stopped.
|
||||
.LP
|
||||
.LP
|
||||
For more information on the Naming Service included with ORBD, see
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html.
|
||||
.LP
|
||||
.SH "Server Manager"
|
||||
.LP
|
||||
.LP
|
||||
To access ORBD's Server Manager and run a persistent server, the server must be started using servertool(1), which is a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server. When a server is started using \f2servertool\fP, it must be started on the same host and port on which \f2orbd\fP is executing. If the server is run on a different port, the information stored in the database for local contexts will be invalid and the service will not work properly.
|
||||
.LP
|
||||
.SS
|
||||
Server Manager: an Example
|
||||
.LP
|
||||
.LP
|
||||
Using the
|
||||
.na
|
||||
\f2sample tutorial\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlExample.html for our demonstration, you would run the \f2idlj\fP compiler and \f2javac\fP compiler as shown in the tutorial. To run the Server Manager, follow these steps for running the application:
|
||||
.LP
|
||||
.LP
|
||||
Start \f2orbd\fP.
|
||||
.LP
|
||||
.LP
|
||||
To start \f2orbd\fP from a UNIX command shell, enter:
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
From an MS\-DOS system prompt (Windows), enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start orbd \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Note that \f21050\fP is the port on which you want the name server to run. \f2\-ORBInitialPort\fP is a required command\-line argument. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024.
|
||||
.LP
|
||||
.LP
|
||||
Start the \f2servertool\fP:
|
||||
.LP
|
||||
.LP
|
||||
To start the Hello server, enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Make sure the name server (\f2orbd\fP) port is the same as in the previous step, for example, \f2\-ORBInitialPort 1050\fP. The \f2servertool\fP must be started on the same port as the name server.
|
||||
.LP
|
||||
.LP
|
||||
The \f2servertool\fP command line interface appears.
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Start the Hello server from the \f2servertool\fP prompt:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool > register \-server HelloServer \-classpath . \-applicationName
|
||||
.fl
|
||||
HelloServerApName
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
The \f2servertool\fP registers the server, assigns it the name of "HelloServerApName", and displays its server id, along with a listing of all registered servers.
|
||||
.LP
|
||||
.LP
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Run the client application from another terminal window or prompt:
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
For this example, you can omit \f2\-ORBInitialHost localhost\fP since the name server is running on the same host as the Hello client. If the name server is running on a different host, use \f2\-ORBInitialHost\fP \f2nameserverhost\fP to specify the host on which the IDL name server is running.
|
||||
.LP
|
||||
.LP
|
||||
Specify the name server (\f2orbd\fP) port as done in the previous step, for example, \f2\-ORBInitialPort 1050\fP.
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
\
|
||||
.LP
|
||||
.LP
|
||||
When you have finished experimenting with the Server Manager, be sure to shut down or kill the name server (\f2orbd\fP) and \f2servertool\fP.
|
||||
.LP
|
||||
.LP
|
||||
To shut down \f2orbd\fP from a DOS prompt, select the window that is running the server and enter \f2Ctrl+C\fP to shut it down. To shut down \f2orbd\fPfrom a Unix shell, find the process, and kill it. The server will continue to wait for invocations until it is explicitly stopped.
|
||||
.LP
|
||||
.LP
|
||||
To shut down the \f2servertool\fP, type \f2quit\fP and press the \f2Enter\fP key on the keyboard.
|
||||
.LP
|
||||
.SH "See Also"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Naming Service\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html
|
||||
.br
|
||||
.TP 2
|
||||
o
|
||||
servertool(1)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.br
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,324 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH pack200 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
pack200 \- JAR Packing tool
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.LP
|
||||
\f4pack200\fP\f2 [ \fP\f2options\fP ] \f2output\-file\fP \f2JAR\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
Options may be in any order. The last option on the command line or in a properties file supersedes all previously specified options.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
options
|
||||
Command\-line options.
|
||||
.TP 3
|
||||
output\-file
|
||||
Name of the output file.
|
||||
.TP 3
|
||||
JAR\-file
|
||||
Name of the input file.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f2pack200\fP tool is a Java application that transforms a JAR file into a compressed \f2pack200\fP file using the Java \f2gzip\fP compressor. The \f2pack200\fP files are highly compressed files that can be directly deployed, saving bandwidth and reducing download time.
|
||||
.LP
|
||||
.LP
|
||||
The \f2pack200\fP tool uses several options to fine\-tune and set the compression engine.
|
||||
.LP
|
||||
.SS
|
||||
Typical usage:
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 myarchive.pack.gz myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
In this example, \f2myarchive.pack.gz\fP is produced using the default \f2pack200\fP settings.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
\f4\-r \-\-repack\fP
|
||||
.LP
|
||||
.LP
|
||||
Produces a JAR file by packing the file \f2myarchive.jar\fP and unpacking it. The resulting file can be used as an input to the \f2jarsigner(1)\fP tool.
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive\-packer.jar myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-repack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-g \-\-no\-gzip\fP
|
||||
.LP
|
||||
.LP
|
||||
Produces a \f2pack200\fP file. With this option a suitable compressor must be used, and the target system must use a corresponding decompresser.
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-\-no\-gzip myarchive.pack myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-G \-\-strip\-debug\fP
|
||||
.LP
|
||||
.LP
|
||||
Strips attributes used for debugging from the output. These include \f2SourceFile\fP, \f2LineNumberTable\fP, \f2LocalVariableTable\fP and \f2LocalVariableTypeTable\fP. Removing these attributes reduces the size of both downloads and installations but reduces the usefulness of debuggers.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
Preserve the order of files in the input file; this is the default behavior.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-O \-\-no\-keep\-file\-order\fP
|
||||
.LP
|
||||
.LP
|
||||
The packer will reorder and transmit all elements. Additionally, the packer may remove JAR directory names. This will reduce the download size; however, certain JAR file optimizations, such as indexing, may not work correctly.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Svalue \-\-segment\-limit=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
The value is the estimated target size N (in bytes) of each archive segment. If a single input file requires
|
||||
.br
|
||||
more than N bytes, it will be given its own archive segment. As a special case, a value of \f2\-1\fP will produce a single large segment with all input files, while a value of \f20\fP will produce one segment for each class. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory.
|
||||
.LP
|
||||
.LP
|
||||
The size of each segment is estimated by counting the size of each input file to be transmitted in the segment, along with the size of its name and other transmitted properties.
|
||||
.LP
|
||||
.LP
|
||||
The default is \-1, which means the packer will always create a single segment output file. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs.
|
||||
.LP
|
||||
.LP
|
||||
A 10MB JAR packed without this limit will typically pack about 10% smaller, but the packer may require a larger Java heap (about ten times the segment limit).
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Evalue \-\-effort=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
If the value is set to a single decimal digit, the packer will use the indicated amount of effort in compressing the archive. Level \f21\fP may produce somewhat larger size and faster compression speed, while level \f29\fP will take much longer but may produce better compression. The special value \f20\fP instructs the packer to copy through the original JAR file directly with no compression. The JSR 200 standard requires any unpacker to understand this special case as a pass\-through of the entire archive.
|
||||
.LP
|
||||
.LP
|
||||
The default is \f25\fP, investing a modest amount of time to produce reasonable compression.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
Overrides the default, which preserves the input information, but may cause the transmitted archive to be larger. The possible values are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
true
|
||||
.TP 3
|
||||
false
|
||||
In either case, the packer will set the deflation hint accordingly in the output archive, and will not transmit the individual deflation hints of archive elements.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
keep
|
||||
Preserve deflation hints observed in the input JAR. (This is the default.)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-mvalue \-\-modification\-time=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
The possible values are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
latest
|
||||
The packer will attempt to determine the latest modification time, among all the available entries in the original archive, or the latest modification time of all the available entries in that segment. This single value will be transmitted as part of the segment and applied to all the entries in each segment. This can marginally decrease the transmitted size of the archive at the expense of setting all installed files to a single date.
|
||||
.TP 3
|
||||
keep
|
||||
Preserves modification times observed in the input JAR. (This is the default.)
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Pfile \-\-pass\-file=\fP\f2file\fP
|
||||
.LP
|
||||
.LP
|
||||
Indicates that a file should be passed through bytewise with no compression. By repeating the option, multiple files may be specified. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator "\f2/\fP". The resulting file names must match exactly as strings with their occurrences in the JAR file. If file is a directory name, all files under that directory will be passed.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Uaction \-\-unknown\-attribute=\fP\f2action\fP
|
||||
.LP
|
||||
.LP
|
||||
Overrides the default behavior; i.e., the class file containing the unknown attribute will be passed through with the specified action. The possible values for actions are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
error
|
||||
The \f2pack200\fP operation as a whole will fail with a suitable explanation.
|
||||
.TP 3
|
||||
strip
|
||||
The attribute will be dropped. Note: Removing the required VM attributes may cause Class Loader failures.
|
||||
.TP 3
|
||||
pass
|
||||
Upon encountering this attribute, the entire class will be transmitted as though it is a resource.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Cattribute\-name=\fP\f2layout\fP \f3\-\-class\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Fattribute\-name=\fP\f2layout\fP \f3\-\-field\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Mattribute\-name=\fP\f2layout\fP \f3\-\-method\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.br
|
||||
\f4\-Dattribute\-name=\fP\f2layout\fP \f3\-\-code\-attribute=\fP\f2attribute\-name=action\fP
|
||||
.LP
|
||||
.LP
|
||||
With the above four options, the attribute layout can be specified for a class entity, such as Class attribute, Field attribute, Method attribute, and Code attribute. The attribute\-name is the name of the attribute for which the layout or action is being defined. The possible values for action are:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
some\-layout\-string
|
||||
The layout language is defined in the JSR 200 specification.
|
||||
.LP
|
||||
Example: \f2\-\-class\-attribute=SourceFile=RUH\fP
|
||||
.TP 3
|
||||
error
|
||||
Upon encountering this attribute, the pack200 operation will fail with a suitable explanation.
|
||||
.TP 3
|
||||
strip
|
||||
Upon encountering this attribute, the attribute will be removed from the output. Note: removing VM\-required attributes may cause Class Loader failures.
|
||||
.TP 3
|
||||
pass
|
||||
Upon encountering this attribute, the entire class will be transmitted as though it is a resource.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Example: \f2\-\-class\-attribute=CompilationID=pass\fP will cause the class file containing the attribute \f2CompilationID\fP to be passed through without further action by the packer.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-f\fP\f2 \fP\f2pack.properties\fP \f3\-\-config\-file=\fP\f2pack.properties\fP
|
||||
.LP
|
||||
.LP
|
||||
A configuration file, containing Java properties to initialize the packer, may be specified on the command line.
|
||||
.LP
|
||||
.LP
|
||||
\f2% pack200 \-f pack.properties myarchive.pack.gz myarchive.jar\fP
|
||||
.br
|
||||
\f2% more pack.properties\fP
|
||||
.br
|
||||
\f2# Generic properties for the packer.\fP
|
||||
.br
|
||||
\f2modification.time=latest\fP
|
||||
.br
|
||||
\f2deflate.hint=false\fP
|
||||
.br
|
||||
\f2keep.file.order=false\fP
|
||||
.br
|
||||
\f2# This option will cause the files bearing new attributes to\fP
|
||||
.br
|
||||
\f2# be reported as an error rather than passed uncompressed.\fP
|
||||
.br
|
||||
\f2unknown.attribute=error\fP
|
||||
.br
|
||||
\f2# Change the segment limit to be unlimited.\fP
|
||||
.br
|
||||
\f2segment.limit=\-1\fP
|
||||
.LP
|
||||
.LP
|
||||
\f4\-v \-\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
Outputs minimal messages. Multiple specification of this option will output more verbose messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-q \-\-quiet\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies quiet operation with no messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies a log file to output messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-? \-h \-\-help\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints help information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-V \-\-version\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints version information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-J\fP\f2option\fP
|
||||
.LP
|
||||
.LP
|
||||
Passes \f2option\fP to the Java launcher called by \f2pack200\fP. For example, \f2\-J\-Xms48m\fP sets the startup memory to 48 megabytes. Although it does not begin with \f2\-X\fP, it is not a standard option of \f2pack200\fP. It is a common convention for \f2\-J\fP to pass options to the underlying VM executing applications written in Java.
|
||||
.LP
|
||||
.SH "EXIT STATUS"
|
||||
.LP
|
||||
.LP
|
||||
The following exit values are returned:
|
||||
.LP
|
||||
.LP
|
||||
\f2\ 0\fP for successful completion;
|
||||
.LP
|
||||
.LP
|
||||
\f2>0\fP if an error occurs.
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
unpack200(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java SE Documentation\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/index.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java Deployment Guide \- Pack200\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
|
||||
.TP 2
|
||||
o
|
||||
jar(1) \- Java Archive Tool
|
||||
.TP 2
|
||||
o
|
||||
jarsigner(1) \- JAR Signer tool
|
||||
.TP 2
|
||||
o
|
||||
\f2attributes(5)\fP man page
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "NOTES"
|
||||
.LP
|
||||
.LP
|
||||
This command should not be confused with \f2pack(1)\fP. They are distinctly separate products.
|
||||
.LP
|
||||
.LP
|
||||
The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH policytool 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
policytool \- PolicyTool Administration GUI Utility
|
||||
.LP
|
||||
\f3policytool\fP reads and writes a plain text policy file based on user input via the utility GUI.
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.LP
|
||||
Run the policytool Administrator's utility
|
||||
.LP
|
||||
.LP
|
||||
\f4policytool\fP
|
||||
.LP
|
||||
.LP
|
||||
Run policytool and load the specified policy file
|
||||
.LP
|
||||
.LP
|
||||
\f4policytool\fP\f2[\-file\ \fP\f2filename\fP\f2]\fP
|
||||
.LP
|
||||
.LP
|
||||
where:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
directs \f2policytool\fP to load a local policy file
|
||||
.TP 3
|
||||
filename
|
||||
The file name
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f3policytool\fP is a GUI that allows users to create and manage policy files. For details, see
|
||||
.na
|
||||
\f2the Policytool Users Guide\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
file
|
||||
Loads \f2filename\fP.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.na
|
||||
\f2Default Policy Implementation and Syntax\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
.na
|
||||
\f2Policy Tool Users' Guide\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyGuide.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
.na
|
||||
\f2Security Permissions\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/permissions.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
.na
|
||||
\f2Security Overview\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/security/overview/jsoverview.html
|
||||
.br
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,309 @@
|
||||
." Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH rmid 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
rmid \- The Java RMI Activation System Daemon
|
||||
.LP
|
||||
.LP
|
||||
\f3rmid\fP starts the activation system daemon that allows objects to be registered and activated in a virtual machine (VM).
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid [options]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3rmid\fP tool starts the activation system daemon. The activation system daemon must be started before activatable objects can be either registered with the activation system or activated in a VM. See the
|
||||
.na
|
||||
\f2Java RMI Specification\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/platform/rmi/spec/rmiTOC.html and
|
||||
.na
|
||||
\f2Activation tutorials\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/activation/overview.html for details on how to write programs that use activatable remote objects.
|
||||
.LP
|
||||
.LP
|
||||
The daemon can be started by executing the \f2rmid\fP command, and specifying a security policy file, as follows:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
\f3Note:\fP When running Sun's implementation of \f2rmid\fP, by default you will need to specify a security policy file so that \f2rmid\fP can verify whether or not the information in each \f2ActivationGroupDesc\fP is allowed to be used to launch a VM for an activation group. Specifically, the command and options specified by the \f2CommandEnvironment\fP and any \f2Properties\fP passed to an \f2ActivationGroupDesc\fP's constructor must now be explicitly allowed in the security policy file for \f2rmid\fP. The value of the \f2sun.rmi.activation.execPolicy\fP property dictates the policy that \f2rmid\fP uses to determine whether or not the information in an \f2ActivationGroupDesc\fP may be used to launch a VM for an activation group.
|
||||
.LP
|
||||
.LP
|
||||
Executing \f2rmid\fP by default
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
starts the Activator and an internal registry on the default port, 1098, and
|
||||
.TP 2
|
||||
o
|
||||
binds an \f2ActivationSystem\fP to the name \f2java.rmi.activation.ActivationSystem\fP in this internal registry.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
To specify an alternate port for the registry, you must specify the \f2\-port\fP option when starting up \f2rmid\fP. For example,
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy \-port 1099
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
starts the activation system daemon and a registry on the registry's default port, 1099.
|
||||
.LP
|
||||
.SS
|
||||
Starting rmid from inetd/xinetd
|
||||
.LP
|
||||
.LP
|
||||
An alternative to starting \f2rmid\fP from the command line is to configure \f2inetd\fP (Solaris) or \f2xinetd\fP (Linux) to start \f2rmid\fP on demand.
|
||||
.LP
|
||||
.LP
|
||||
When \f2rmid\fP starts up, it attempts to obtain an inherited channel (inherited from \f2inetd\fP/\f2xinetd\fP) by invoking the \f2System.inheritedChannel\fP method. If the inherited channel is \f2null\fP or not an instance of \f2java.nio.channels.ServerSocketChannel\fP, then \f2rmid\fP assumes that it was not started by \f2inetd\fP/\f2xinetd\fP, and it starts up as described above.
|
||||
.LP
|
||||
.LP
|
||||
If the inherited channel is a \f2ServerSocketChannel\fP instance, then \f2rmid\fP uses the \f2java.net.ServerSocket\fP obtained from the \f2ServerSocketChannel\fP as the server socket that accepts requests for the remote objects it exports, namely the registry in which the \f2java.rmi.activation.ActivationSystem\fP is bound and the \f2java.rmi.activation.Activator\fP remote object. In this mode, \f2rmid\fP behaves the same as when it is started from the command line, \f2except\fP:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Output printed to \f2System.err\fP is redirected to a file. This file is located in the directory specified by the \f2java.io.tmpdir\fP system property (typically \f2/var/tmp\fP or \f2/tmp\fP) with the prefix \f2"rmid\-err"\fP and the suffix \f2"tmp"\fP.
|
||||
.TP 2
|
||||
o
|
||||
The \f2\-port\fP option is disallowed. If this option is specified, \f2rmid\fP will exit with an error message.
|
||||
.TP 2
|
||||
o
|
||||
The \f2\-log\fP option is required. If this option is not specified, \f2rmid\fP will exit with an error message.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
See the man pages for \f2inetd\fP (Solaris) or \f2xinetd\fP (Linux) for details on how to configure services to be started on demand.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-C<someCommandLineOption>
|
||||
Specifies an option that is passed as a command\-line argument to each child process (activation group) of \f2rmid\fP when that process is created. For example, you could pass a property to each virtual machine spawned by the activation system daemon:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Dsome.property=value
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
This ability to pass command\-line arguments to child processes can be useful for debugging. For example, the following command:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-C\-Djava.rmi.server.logCalls=true
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
will enable server\-call logging in all child VMs.
|
||||
.LP
|
||||
.TP 3
|
||||
\-J<someCommandLineOption>
|
||||
Specifies an option that is passed to the \f2java\fP interpreter running \f2rmid\fP. For example, to specify that \f2rmid\fP use a policy file named \f2rmid.policy\fP, the \f2\-J\fP option can be used to define the \f2java.security.policy\fP property on \f2rmid\fP's command line, for example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmid \-J\-Djava.security.policy=rmid.policy
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 3
|
||||
\-J\-Dsun.rmi.activation.execPolicy=<policy>
|
||||
Specifies the policy that \f2rmid\fP employs to check commands and command\-line options used to launch the VM in which an activation group runs. Please note that this option exists only in Sun's implementation of the Java RMI activation daemon. If this property is not specified on the command line, the result is the same as if \f2\-J\-Dsun.rmi.activation.execPolicy=default\fP were specified. The possible values of \f2<policy>\fP can be \f2default\fP, \f2<policyClassName>\fP, or \f2none\fP:
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f3default (or if this property is \fP\f4unspecified\fP\f3)\fP
|
||||
.LP
|
||||
The default \f2execPolicy\fP allows \f2rmid\fP to execute commands with specific command\-line options only if \f2rmid\fP has been granted permission to execute those commands and options in the security policy file that \f2rmid\fP uses. Only the default activation group implementation can be used with the \f2default\fP execution policy.
|
||||
.LP
|
||||
\f2rmid\fP launches a VM for an activation group using the information in the group's registered activation group descriptor, an \f2ActivationGroupDesc\fP. The group descriptor specifies an optional \f2ActivationGroupDesc.CommandEnvironment\fP which includes the \f2command\fP to execute to start the activation group as well as any command line \f2options\fP to be added to the command line. By default, \f2rmid\fP uses the \f2java\fP command found in \f2java.home\fP. The group descriptor also contains \f2properties\fP overrides that are added to the command line as options defined as:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
\-D\fP\f4<property>\fP\f3=\fP\f4<value>\fP\f3
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.LP
|
||||
The permission \f2com.sun.rmi.rmid.ExecPermission\fP is used to grant \f2rmid\fP permission to execute a command, specified in the group descriptor's \f2CommandEnvironment\fP to launch an activation group. The permission \f2com.sun.rmi.rmid.ExecOptionPermission\fP is used to allow \f2rmid\fP to use command\-line options, specified as properties overrides in the group descriptor or as options in the \f2CommandEnvironment\fP, when launching the activation group.
|
||||
.LP
|
||||
When granting \f2rmid\fP permission to execute various commands and options, the permissions \f2ExecPermission\fP and \f2ExecOptionPermission\fP need to be granted universally (i.e., granted to all code sources).
|
||||
.RS 3
|
||||
.TP 3
|
||||
ExecPermission
|
||||
The \f2ExecPermission\fP class represents permission for \f2rmid\fP to execute a specific \f2command\fP to launch an activation group.
|
||||
.LP
|
||||
\f3Syntax\fP
|
||||
.br
|
||||
The \f2name\fP of an \f2ExecPermission\fP is the path name of a command to grant \f2rmid\fP permission to execute. A path name that ends in "/*" indicates all the files contained in that directory (where "/" is the file\-separator character, \f2File.separatorChar\fP). A path name that ends with "/\-" indicates all files and subdirectories contained in that directory (recursively). A path name consisting of the special token "<<ALL FILES>>" matches \f3any\fP file.
|
||||
.LP
|
||||
\f3Note:\fP A path name consisting of a single "*" indicates all the files in the current directory, while a path name consisting of a single "\-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory.
|
||||
.TP 3
|
||||
ExecOptionPermission
|
||||
The \f2ExecOptionPermission\fP class represents permission for \f2rmid\fP to use a specific command\-line \f2option\fP when launching an activation group. The \f2name\fP of an \f2ExecOptionPermission\fP is the value of a command line option.
|
||||
.LP
|
||||
\f3Syntax\fP
|
||||
.br
|
||||
Options support a limited wildcard scheme. An asterisk signifies a wildcard match, and it may appear as the option name itself (i.e., it matches any option), or an asterisk may appear at the end of the option name only if the asterisk follows either a "." or "=".
|
||||
.LP
|
||||
For example: "*" or "\-Dfoo.*" or "\-Da.b.c=*" is valid, "*foo" or "\-Da*b" or "ab*" is not.
|
||||
.TP 3
|
||||
Policy file for rmid
|
||||
When granting \f2rmid\fP permission to execute various commands and options, the permissions \f2ExecPermission\fP and \f2ExecOptionPermission\fP need to be granted universally (i.e., granted to all code sources). It is safe to grant these permissions universally because only \f2rmid\fP checks these permissions.
|
||||
.LP
|
||||
An example policy file that grants various execute permissions to \f2rmid\fP is:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
grant {
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/java/jdk1.7.0/solaris/bin/java";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecPermission
|
||||
.fl
|
||||
"/files/apps/rmidcmds/*";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.policy=/files/policies/group.policy";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Djava.security.debug=*";
|
||||
.fl
|
||||
|
||||
.fl
|
||||
permission com.sun.rmi.rmid.ExecOptionPermission
|
||||
.fl
|
||||
"\-Dsun.rmi.*";
|
||||
.fl
|
||||
};
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
The first permission granted allow \f2rmid\fP to execute the 1.7.0 version of the \f2java\fP command, specified by its explicit path name. Note that by default, the version of the \f2java\fP command found in \f2java.home\fP is used (the same one that \f2rmid\fP uses), and does not need to be specified in the policy file. The second permission allows \f2rmid\fP to execute any command in the directory \f2/files/apps/rmidcmds\fP.
|
||||
.LP
|
||||
The third permission granted, an \f2ExecOptionPermission\fP, allows \f2rmid\fP to launch an activation group that defines the security policy file to be \f2/files/policies/group.policy\fP. The next permission allows the \f2java.security.debug\fP property to be used by an activation group. The last permission allows any property in the \f2sun.rmi\fP property name hierarchy to be used by activation groups.
|
||||
.LP
|
||||
To start \f2rmid\fP with a policy file, the \f2java.security.policy\fP property needs to be specified on \f2rmid\fP's command line, for example:
|
||||
.LP
|
||||
\f2rmid \-J\-Djava.security.policy=rmid.policy\fP
|
||||
.RE
|
||||
.TP 2
|
||||
o
|
||||
\f4<policyClassName>\fP
|
||||
.LP
|
||||
If the default behavior is not flexible enough, an administrator can provide, when starting \f2rmid\fP, the name of a class whose \f2checkExecCommand\fP method is executed in order to check commands to be executed by rmid.
|
||||
.LP
|
||||
The \f2policyClassName\fP specifies a public class with a public, no\-argument constructor and an implementation of the following \f2checkExecCommand\fP method:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
public void checkExecCommand(ActivationGroupDesc desc,
|
||||
.fl
|
||||
String[] command)
|
||||
.fl
|
||||
throws SecurityException;
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
Before launching an activation group, \f2rmid\fP calls the policy's \f2checkExecCommand\fP method, passing it the activation group descriptor and an array containing the complete command to launch the activation group. If the \f2checkExecCommand\fP throws a \f2SecurityException\fP, \f2rmid\fP will not launch the activation group and an \f2ActivationException\fP will be thrown to the caller attempting to activate the object.
|
||||
.TP 2
|
||||
o
|
||||
\f3none\fP
|
||||
.LP
|
||||
If the \f2sun.rmi.activation.execPolicy\fP property value is "none", then \f2rmid\fP will not perform any validation of commands to launch activation groups.
|
||||
.RE
|
||||
.LP
|
||||
.TP 3
|
||||
\-log dir
|
||||
Specifies the name of the directory the activation system daemon uses to write its database and associated information. The log directory defaults to creating a directory, \f2log\fP, in the directory in which the \f2rmid\fP command was executed.
|
||||
.LP
|
||||
.TP 3
|
||||
\-port port
|
||||
Specifies the port \f2rmid\fP's registry uses. The activation system daemon binds the \f2ActivationSystem\fP, with the name \f2java.rmi.activation.ActivationSystem\fP, in this registry. Thus, the \f2ActivationSystem\fP on the local machine can be obtained using the following \f2Naming.lookup\fP method call:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.rmi.*;
|
||||
.fl
|
||||
import java.rmi.activation.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
ActivationSystem system; system = (ActivationSystem)
|
||||
.fl
|
||||
Naming.lookup("//:\fP\f4port\fP/java.rmi.activation.ActivationSystem");
|
||||
.fl
|
||||
.fi
|
||||
.TP 3
|
||||
\-stop
|
||||
Stops the current invocation of \f2rmid\fP, for a port specified by the \f2\-port\fP option. If no port is specified, it will stop the \f2rmid\fP running on port 1098.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
CLASSPATH
|
||||
Used to provide the system a path to user\-defined classes. Directories are separated by colons. For example:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
.:/usr/local/java/classes
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.LP
|
||||
rmic(1),
|
||||
.na
|
||||
\f2CLASSPATH\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/tools/index.html#classpath, java(1)
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
." Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH rmiregistry 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
rmiregistry \- The Java Remote Object Registry
|
||||
.LP
|
||||
.RS 3
|
||||
The \f3rmiregistry\fP command starts a remote object registry on the specified port on the current host.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
rmiregistry [\fP\f4port\fP\f3]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f3rmiregistry\fP command creates and starts a remote object registry on the specified \f2port\fP on the current host. If \f2port\fP is omitted, the registry is started on port 1099. The \f3rmiregistry\fP command produces no output and is typically run in the background. For example:
|
||||
.LP
|
||||
.LP
|
||||
\f2rmiregistry &\fP
|
||||
.LP
|
||||
.LP
|
||||
A remote object registry is a bootstrap naming service that is used by RMI servers on the same host to bind remote objects to names. Clients on local and remote hosts can then look up remote objects and make remote method invocations.
|
||||
.LP
|
||||
.LP
|
||||
The registry is typically used to locate the first remote object on which an application needs to invoke methods. That object in turn will provide application\-specific support for finding other objects.
|
||||
.LP
|
||||
.LP
|
||||
The methods of the \f2java.rmi.registry.LocateRegistry\fP class are used to get a registry operating on the local host or local host and port.
|
||||
.LP
|
||||
.LP
|
||||
The URL\-based methods of the \f2java.rmi.Naming\fP class operate on a registry and can be used to look up a remote object on any host, and on the local host: bind a simple (string) name to a remote object, rebind a new name to a remote object (overriding the old binding), unbind a remote object, and list the URLs bound in the registry.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-J
|
||||
Used in conjunction with any \f2java\fP option, it passes the option following the \f2\-J\fP (no spaces between the \-J and the option) on to the \f2java\fP interpreter.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
java(1),
|
||||
.na
|
||||
\f2java.rmi.registry.LocateRegistry\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/api/java/rmi/registry/LocateRegistry.html and
|
||||
.na
|
||||
\f2java.rmi.Naming\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/api/java/rmi/Naming.html
|
||||
@@ -0,0 +1,94 @@
|
||||
." Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH servertool 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
servertool \- The Java(TM) IDL Server Tool
|
||||
.LP
|
||||
\f3servertool\fP provides a command\-line interface for application programmers to register, unregister, startup, and shutdown a persistent server.
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
servertool \-ORBInitialPort \fP\f4nameserverport\fP\f3 \fP\f3options\fP\f3 [ \fP\f3commands\fP\f3 ]
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
If you did not enter a command when starting \f2servertool\fP, the command\-line tool displays with a \f2servertool >\fP prompt. Enter commands at the \f2servertool >\fP prompt.
|
||||
.LP
|
||||
.LP
|
||||
If you enter a command when starting \f2servertool\fP, the Java IDL Server Tool starts, runs the command, and exits.
|
||||
.LP
|
||||
.LP
|
||||
The \f2\-ORBInitialPort\fP \f2nameserverport\fP option is \f3required\fP. The value for \f2nameserverport\fP must specify the port on which \f2orbd\fP is running and listening for incoming requests. When using Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024 for the \f2nameserverport\fP.
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
The \f2servertool\fP provides the command\-line interface for the application programmers to register, unregister, startup, and shutdown a persistent server. Other commands are provided to obtain various statistical information about the server.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-ORBInitialHost nameserverhost
|
||||
Specifies the host machine on which the name server is running and listening for incoming requests. The \f2nameserverhost\fP defaults to \f2localhost\fP if this option is not specified. If \f2orbd\fP and \f2servertool\fP are running on different machines, you must specify the name or IP address of the host on which \f2orbd\fP is running.
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "COMMANDS"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
register \-server\ <server\ class\ name> \ \-classpath\ <classpath\ to\ server> [\ \-applicationName\ <application\ name> \-args\ <args\ to\ server> \-vmargs\ <flags\ to\ be\ passed\ to\ Java\ VM> \ ]
|
||||
Register a new persistent server with the Object Request Broker Daemon (ORBD). If the server is not already registered, it is registered and activated. This command causes an install method to be invoked in the main class of the server identified by the \f2\-server\fP option. The install method must be \f2public static void install(org.omg.CORBA.ORB)\fP. The install method is optional and enables the developer to provide their own server installation behavior (for example, creating database schema).
|
||||
.TP 3
|
||||
unregister \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
Unregister a server from the ORBD by using either its server id or its application name. This command causes an uninstall method to be invoked in the main class of the server identified by the \f2\-server\fP option. The uninstall method must be \f2public static void uninstall(org.omg.CORBA.ORB)\fP. The uninstall method is optional and enables the developer to provide their own server uninstall behavior (for example, undoing the behavior of the install method).
|
||||
.TP 3
|
||||
getserverid \-applicationName\ <application\ name>
|
||||
Return the server id that corresponds with an application.
|
||||
.TP 3
|
||||
list
|
||||
List information about all persistent servers registered with the ORBD.
|
||||
.TP 3
|
||||
listappnames
|
||||
List the application names for all servers currently registered with the ORBD.
|
||||
.TP 3
|
||||
listactive
|
||||
List information about all persistent servers that have been launched by the ORBD and are currently running.
|
||||
.TP 3
|
||||
locate \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name> [\-endpointType\ <endpointType>\ ]
|
||||
Locate the endpoints (ports) of a specific type for all ORBs created by a registered server. If a server is not already running, it is activated. If an endpoint type is not specified, then the plain/non\-protected endpoint associated with each ORB in a server is returned.
|
||||
.TP 3
|
||||
locateperorb \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name> [\-orbid\ <ORB\ name>\ ]
|
||||
Locate all the endpoints (ports) registered by a specific ORB of registered server. If a server is not already running, then it is activated. If an \f2orbid\fP is not specified, the default value of "" is assigned to the \f2orbid\fP. If any ORBs are created with an \f2orbid\fP of empty string, all ports registered by it are returned.
|
||||
.TP 3
|
||||
orblist \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
Lists the ORBId of the ORBs defined on a server. An ORBId is the string name for the ORB created by the server. If the server is not already running, it is activated.
|
||||
.TP 3
|
||||
shutdown \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
Shutdown an active server that is registered with ORBD. During execution of this command, the \f2shutdown()\fP method defined in the class specified by either the \f2\-serverid\fP or \f2\-applicationName\fP parameter is also invoked to shutdown the server process appropriately.
|
||||
.TP 3
|
||||
startup \-serverid\ <server\ id\ >\ | \-applicationName\ <application\ name>
|
||||
Startup or activate a server that is registered with ORBD. If the server is not running, this command launches the server. If the server is already running, an error message is returned to the user.
|
||||
.TP 3
|
||||
help
|
||||
List all the commands available to the server through the server tool.
|
||||
.TP 3
|
||||
quit
|
||||
Exit the server tool.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
orbd(1)
|
||||
@@ -0,0 +1,475 @@
|
||||
." Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH tnameserv 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
Java IDL: Transient Naming Service \- \f2tnameserv\fP
|
||||
.LP
|
||||
.LP
|
||||
This document discusses using the Java IDL Transient Naming Service, \f2tnameserv\fP. Java IDL also includes the Object Request Broker Daemon (ORBD). ORBD is a daemon process containing a Bootstrap Service, a Transient Naming Service, a \f3Persistent\fP Naming Service, and a Server Manager. The Java IDL tutorials all use ORBD, however, you can substitute \f2tnameserv\fP for \f2orbd\fP in any of the examples that use a Transient Naming Service. For documentation on the \f2orbd\fP tool, link to its orbd(1) or the
|
||||
.na
|
||||
\f2Java IDL Naming Service Included with ORBD\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/jidlNaming.html topic.
|
||||
.LP
|
||||
.LP
|
||||
Topics in this section include:
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Java\ IDL Transient Naming Service
|
||||
.TP 2
|
||||
o
|
||||
Starting the Java\ IDL Transient Naming Service
|
||||
.TP 2
|
||||
o
|
||||
Stopping the Java\ IDL Transient Naming Service
|
||||
.TP 2
|
||||
o
|
||||
Sample Client: Adding Objects to the Namespace
|
||||
.TP 2
|
||||
o
|
||||
Sample Client: Browsing the Namespace
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Java\ IDL Transient Naming Service"
|
||||
.LP
|
||||
.LP
|
||||
The CORBA COS (Common Object Services) Naming Service provides a tree\-like directory for object references much like a filesystem provides a directory structure for files. The Transient Naming Service provided with Java IDL, \f2tnameserv\fP, is a simple implementation of the COS Naming Service specification.
|
||||
.LP
|
||||
.LP
|
||||
Object references are stored in the namespace by name and each object reference\-name pair is called a name \f2binding\fP. Name bindings may be organized under \f2naming contexts\fP. Naming contexts are themselves name bindings and serve the same organizational function as a file system subdirectory. All bindings are stored under the \f2initial naming context\fP. The initial naming context is the only persistent binding in the namespace; the rest of the namespace is lost if the Java IDL naming service process halts and restarts.
|
||||
.LP
|
||||
.LP
|
||||
For an applet or application to use COS naming, its ORB must know the port of a host running a naming service or have access to a stringified initial naming context for that naming service. The naming service can either be the Java\ IDL naming service or another COS\-compliant naming service.
|
||||
.LP
|
||||
.SH "Starting the Java\ IDL Transient Naming Service"
|
||||
.LP
|
||||
.LP
|
||||
You must start the Java\ IDL naming service before an application or applet that uses its naming service. Installation of the Java\ IDL product creates a script (Solaris: \f2tnameserv\fP) or executable file (Windows NT: \f2tnameserv.exe\fP) that starts the Java\ IDL naming service. Start the naming service so it runs in the background.
|
||||
.LP
|
||||
.LP
|
||||
If you do not specify otherwise, the Java\ IDL naming service listens on port 900 for the bootstrap protocol used to implement the ORB \f2resolve_initial_references()\fP and \f2list_initial_references()\fP methods, as follows:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort \fP\f4nameserverport\fP\f3&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
If you do not specify the name server port, port 900 is used by default. When running Solaris software, you must become root to start a process on a port under 1024. For this reason, we recommend that you use a port number greater than or equal to 1024. To specify a different port, for example, 1050, and to run the naming service in the background, from a UNIX command shell, enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort 1050&
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
From an MS\-DOS system prompt (Windows), enter:
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
start tnameserv \-ORBInitialPort 1050
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.LP
|
||||
Clients of the name server must be made aware of the new port number. Do this by setting the \f2org.omg.CORBA.ORBInitialPort\fP property to the new port number when creating the ORB object.
|
||||
.LP
|
||||
.SS
|
||||
Running the server and client on different hosts
|
||||
.LP
|
||||
.LP
|
||||
In most of the Java IDL and RMI\-IIOP tutorials, the Naming Service, Server, and Client are all running on the development machine. In real world deployment, it is likely that the client and server will run on different host machines than the Naming Service.
|
||||
.LP
|
||||
.LP
|
||||
For the client and server to find the Naming Service, they must be made aware of the port number and host on which the naming service is running. Do this by setting the \f2org.omg.CORBA.ORBInitialPort\fP and \f2org.omg.CORBA.ORBInitialHost\fP properties in the client and server files to the machine name and port number on which the Naming Service is running. An example of this is shown in
|
||||
.na
|
||||
\f2The Hello World Example Using RMI\-IIOP\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/rmi\-iiop/rmiiiopexample.html. You could also use the command line options \f2\-ORBInitialPort\fP \f2nameserverport#\fP and \f2\-ORBInitialHost\fP \f2nameserverhostname\fP to tell the client and server where to find the Naming Service.
|
||||
.na
|
||||
\f2Java IDL: Running the Hello World Example on TWO Machines\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/idl/tutorial/jidl2machines.html shows one way of doing this using the command line option.
|
||||
.LP
|
||||
.LP
|
||||
For example, suppose the Transient Naming Service, \f2tnameserv\fP is running on port 1050 on host \f2nameserverhost\fP. The client is running on host \f2clienthost\fP and the server is running on host \f2serverhost\fP.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
Start \f2tnameserv\fP on the host \f2nameserverhost\fP, as follows:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
tnameserv \-ORBInitialPort 1050
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 2
|
||||
o
|
||||
Start the server on the \f2serverhost\fP, as follows:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java Server \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.TP 2
|
||||
o
|
||||
Start the client on the \f2clienthost\fP, as follows:
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
java Client \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SS
|
||||
The \-J option
|
||||
.LP
|
||||
This command\-line option is available for use with \f2tnameserve\fP:
|
||||
.RS 3
|
||||
.TP 3
|
||||
\-Joption
|
||||
Pass \f2option\fP to the Java virtual machine, where \f2option\fP is one of the options described on the reference page for java(1). For example, \f3\-J\-Xms48m\fP sets the startup memory to 48 megabytes. It is a common convention for \f3\-J\fP to pass options to the underlying virtual machine.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "Stopping the Java\ IDL Transient Naming Service"
|
||||
.LP
|
||||
.LP
|
||||
To stop the Java\ IDL naming service, use the relevant operating system command, such as \f2kill\fP for a Unix process, or \f2Ctrl\-C\fP for a Windows process. The naming service will continue to wait for invocations until it is explicitly shutdown. Note that names registered with the Java\ IDL naming service disappear when the service is terminated.
|
||||
.LP
|
||||
.SH "Sample Client: Adding Objects to the Namespace"
|
||||
.LP
|
||||
.LP
|
||||
The following sample program illustrates how to add names to the namespace. It is a self\-contained Transient Naming Service client that creates the following simple tree.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
\f4Initial Naming Context\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
*
|
||||
\f3plans\fP
|
||||
.TP 2
|
||||
*
|
||||
\f4Personal\fP
|
||||
.RS 3
|
||||
.TP 2
|
||||
-
|
||||
\f3calendar\fP
|
||||
.TP 2
|
||||
-
|
||||
\f3schedule\fP
|
||||
.RE
|
||||
.RE
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.LP
|
||||
In this example, \f3plans\fP is an object reference and \f3Personal\fP is a naming context that contains two object references: \f3calendar\fP and \f3schedule\fP.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.util.Properties;
|
||||
.fl
|
||||
import org.omg.CORBA.*;
|
||||
.fl
|
||||
import org.omg.CosNaming.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class NameClient
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
public static void main(String args[])
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
try {
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
In the above section, Starting the Java IDL Transient Naming Service, the nameserver was started on port 1050. The following code ensures that the client program is aware of this port number.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
This code obtains the initial naming context and assigns it to \f3ctx\fP. The second line copies \f3ctx\fP into a dummy object reference \f3objref\fP that we'll attach to various names and add into the namespace.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NamingContext ctx =
|
||||
.fl
|
||||
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
|
||||
.fl
|
||||
NamingContext objref = ctx;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
This code creates a name "plans" of type "text" and binds it to our dummy object reference. "plans" is then added under the initial naming context using \f2rebind\fP. The \f2rebind\fP method allows us to run this program over and over again without getting the exceptions we'd get from using \f2bind\fP.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc1 = new NameComponent("plans", "text");
|
||||
.fl
|
||||
NameComponent[] name1 = {nc1};
|
||||
.fl
|
||||
ctx.rebind(name1, objref);
|
||||
.fl
|
||||
System.out.println("plans rebind successful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
This code creates a naming context called "Personal" of type "directory". The resulting object reference, \f3ctx2\fP, is bound to the name and added under the initial naming context.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc2 = new NameComponent("Personal", "directory");
|
||||
.fl
|
||||
NameComponent[] name2 = {nc2};
|
||||
.fl
|
||||
NamingContext ctx2 = ctx.bind_new_context(name2);
|
||||
.fl
|
||||
System.out.println("new naming context added..");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
The remainder of the code binds the dummy object reference using the names "schedule" and "calendar" under the "Personal" naming context (\f3ctx2\fP).
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NameComponent nc3 = new NameComponent("schedule", "text");
|
||||
.fl
|
||||
NameComponent[] name3 = {nc3};
|
||||
.fl
|
||||
ctx2.rebind(name3, objref);
|
||||
.fl
|
||||
System.out.println("schedule rebind successful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
NameComponent nc4 = new NameComponent("calender", "text");
|
||||
.fl
|
||||
NameComponent[] name4 = {nc4};
|
||||
.fl
|
||||
ctx2.rebind(name4, objref);
|
||||
.fl
|
||||
System.out.println("calender rebind successful!");
|
||||
.fl
|
||||
|
||||
.fl
|
||||
|
||||
.fl
|
||||
} catch (Exception e) {
|
||||
.fl
|
||||
e.printStackTrace(System.err);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
.SH "Sample Client: Browsing the Namespace"
|
||||
.LP
|
||||
.LP
|
||||
The following sample program illustrates how to browse the namespace.
|
||||
.LP
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
import java.util.Properties;
|
||||
.fl
|
||||
import org.omg.CORBA.*;
|
||||
.fl
|
||||
import org.omg.CosNaming.*;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
public class NameClientList
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
public static void main(String args[])
|
||||
.fl
|
||||
{
|
||||
.fl
|
||||
try {
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
In the above section, Starting the Java IDL Transient Naming Service, the nameserver was started on port 1050. The following code ensures that the client program is aware of this port number.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
|
||||
.fl
|
||||
Properties props = new Properties();
|
||||
.fl
|
||||
props.put("org.omg.CORBA.ORBInitialPort", "1050");
|
||||
.fl
|
||||
ORB orb = ORB.init(args, props);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
The following code obtains the initial naming context.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
NamingContext nc =
|
||||
.fl
|
||||
NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
The \f2list\fP method lists the bindings in the naming context. In this case, up to 1000 bindings from the initial naming context will be returned in the BindingListHolder; any remaining bindings are returned in the BindingIteratorHolder.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
BindingListHolder bl = new BindingListHolder();
|
||||
.fl
|
||||
BindingIteratorHolder blIt= new BindingIteratorHolder();
|
||||
.fl
|
||||
nc.list(1000, bl, blIt);
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
This code gets the array of bindings out of the returned BindingListHolder. If there are no bindings, the program ends.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
Binding bindings[] = bl.value;
|
||||
.fl
|
||||
if (bindings.length == 0) return;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
The remainder of the code loops through the bindings and prints the names out.
|
||||
.nf
|
||||
\f3
|
||||
.fl
|
||||
for (int i=0; i < bindings.length; i++) {
|
||||
.fl
|
||||
|
||||
.fl
|
||||
// get the object reference for each binding
|
||||
.fl
|
||||
org.omg.CORBA.Object obj = nc.resolve(bindings[i].binding_name);
|
||||
.fl
|
||||
String objStr = orb.object_to_string(obj);
|
||||
.fl
|
||||
int lastIx = bindings[i].binding_name.length\-1;
|
||||
.fl
|
||||
|
||||
.fl
|
||||
// check to see if this is a naming context
|
||||
.fl
|
||||
if (bindings[i].binding_type == BindingType.ncontext) {
|
||||
.fl
|
||||
System.out.println( "Context: " +
|
||||
.fl
|
||||
bindings[i].binding_name[lastIx].id);
|
||||
.fl
|
||||
} else {
|
||||
.fl
|
||||
System.out.println("Object: " +
|
||||
.fl
|
||||
bindings[i].binding_name[lastIx].id);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
|
||||
.fl
|
||||
} catch (Exception e) {
|
||||
.fl
|
||||
e.printStackTrace(System.err);
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
}
|
||||
.fl
|
||||
\fP
|
||||
.fi
|
||||
|
||||
.LP
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
." Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
."
|
||||
.TH unpack200 1 "18 Jul 2013"
|
||||
|
||||
.LP
|
||||
.SH "Name"
|
||||
unpack200 \- JAR Unpacking tool
|
||||
.LP
|
||||
.SH "SYNOPSIS"
|
||||
.LP
|
||||
.LP
|
||||
\f4unpack200\fP\f2 [ \fP\f2options\fP ] \f2input\-file\fP \f2JAR\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
Options may be in any order. The last option on the command line supersedes all previously specified options.
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 3
|
||||
input\-file
|
||||
Name of the input file, which can be a pack200 gzip file or a pack200 file. The input could also be JAR file produced by pack200(1) with an effort of 0. In this case the contents of the input file will be copied to the output JAR file with the Pack200 marker.
|
||||
.TP 3
|
||||
JAR\-file
|
||||
Name of the output JAR file.
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "DESCRIPTION"
|
||||
.LP
|
||||
.LP
|
||||
\f2unpack200\fP is a native implementation that transforms a packed file produced by \f2pack200\fP(1) into a JAR file. Typical usage:
|
||||
.LP
|
||||
.LP
|
||||
\f2% unpack200 myarchive.pack.gz myarchive.jar\fP
|
||||
.LP
|
||||
.LP
|
||||
In this example, the \f2myarchive.jar\fP is produced from \f2myarchive.pack.gz\fP using the default \f2unpack200\fP settings.
|
||||
.LP
|
||||
.SH "OPTIONS"
|
||||
.LP
|
||||
.LP
|
||||
\f4\-Hvalue \-\-deflate\-hint=\fP\f2value\fP
|
||||
.LP
|
||||
.LP
|
||||
Sets the deflation to be \f2true\fP, \f2false\fP, or \f2keep\fP on all entries within a JAR file. The default mode is \f2keep\fP. If \f2true\fP or \f2false\fP, overrides the default behavior and sets the deflation mode on all entries within the output JAR file.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-r \-\-remove\-pack\-file\fP
|
||||
.LP
|
||||
.LP
|
||||
Removes the input packed file.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-v \-\-verbose\fP
|
||||
.LP
|
||||
.LP
|
||||
Outputs minimal messages. Multiple specification of this option will output more verbose messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-q \-\-quiet\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies quiet operation with no messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-lfilename \-\-log\-file=\fP\f2filename\fP
|
||||
.LP
|
||||
.LP
|
||||
Specifies a log file to output messages.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-? \-h \-\-help\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints help information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-V \-\-version\fP
|
||||
.LP
|
||||
.LP
|
||||
Prints version information about this command.
|
||||
.LP
|
||||
.LP
|
||||
\f4\-J\fP\f2option\fP
|
||||
.LP
|
||||
.LP
|
||||
Passes \f2option\fP to the Java launcher called by \f2unpack200\fP.
|
||||
.LP
|
||||
.SH "EXIT STATUS"
|
||||
.LP
|
||||
.LP
|
||||
The following exit values are returned:
|
||||
.LP
|
||||
.LP
|
||||
\f2\ 0\fP if successful completion;
|
||||
.LP
|
||||
.LP
|
||||
\f2>0\fP if an error occurred.
|
||||
.LP
|
||||
.SH "SEE ALSO"
|
||||
.LP
|
||||
.RS 3
|
||||
.TP 2
|
||||
o
|
||||
pack200(1)
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java SE Documentation\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/index.html
|
||||
.TP 2
|
||||
o
|
||||
.na
|
||||
\f2Java Deployment Guide \- Pack200\fP @
|
||||
.fi
|
||||
http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment\-guide/pack200.html
|
||||
.TP 2
|
||||
o
|
||||
jar(1) \- Java Archive Tool
|
||||
.TP 2
|
||||
o
|
||||
jarsigner(1) \- JAR Signer tool
|
||||
.TP 2
|
||||
o
|
||||
\f2attributes(5)\fP man page
|
||||
.RE
|
||||
|
||||
.LP
|
||||
.SH "NOTES"
|
||||
.LP
|
||||
.LP
|
||||
This command should not be confused with \f2unpack(1)\fP. They are distinctly separate products.
|
||||
.LP
|
||||
.LP
|
||||
The Java SE API Specification provided with the JDK is the superseding authority, in case of discrepancies.
|
||||
.LP
|
||||
|
||||
Reference in New Issue
Block a user