そごうソフトウェア研究所

SOA、開発プロセス、ITアーキテクチャなどについて書いています。Twitterやってます@rsogo

Javaの非標準オプション一覧


"java -X"で-Xから始まるオプションの一覧が
見れることを今まで知りませんでした。


"-Xrs"を調べようとしてたら、たまたま発見しました。以下、JDK1.5の結果。


>java -version

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

>java -X

-Xmixed mixed mode execution (default)
-Xint interpreted mode execution only
-Xbootclasspath:
set search path for bootstrap classes and resources
-Xbootclasspath/a:
append to end of bootstrap class path
-Xbootclasspath/p:
prepend in front of bootstrap class path
-Xnoclassgc disable class garbage collection
-Xincgc enable incremental garbage collection
-Xloggc: log GC status to a file with time stamps
-Xbatch disable background compilation
-Xms set initial Java heap size
-Xmx set maximum Java heap size
-Xss set java thread stack size
-Xprof output cpu profiling data
-Xfuture enable strictest checks, anticipating future default
-Xrs reduce use of OS signals by Java/VM (see documentation)
-Xcheck:jni perform additional checks for JNI functions
-Xshare:off do not attempt to use shared class data
-Xshare:auto use shared class data if possible (default)
-Xshare:on require using shared class data, otherwise fail.

The -X options are non-standard and subject to change without notice.


ちなみに、JDK1.6も同様。JDK1.4と比較すると、
1.4にはあった"-Xdebug"がなくなり、1.5から次の三つが増えました。


-Xshare:off
-Xshare:auto
-Xshare:on


ちなみにこのオプションは、クラスデータの共有だそうです。
http://java.sun.com/j2se/1.5.0/ja/docs/ja/guide/vm/class-data-sharing.html