This document is a compilation of all the JVM options for various versions of the JVM on primarily SPARC/Solaris Platform. The descriptions for each option are
taken mostly verbatim from the reference documents.
The JavaTM HotSpot VM Options page makes some good points regarding the different types of options, which should be followed when reading this document
as well. To paraphrase:
l Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages.
l Options that begin with -X are non-standard (not guaranteed to be supported on all VM implementations), and are subject to change without notice in
subsequent releases of the Java 2 SDK.
l Because the -XX options have specific system requirements for correct operation and may require privileged access to system configuration
parameters, they are not recommended for casual use. These options are also subject to change without notice.
Please submit any comments, corrections, additions to jvm-options-list@sun.com .
Caveats: I am not associated with any Java Platform development group, I simply put this list together from the various reference sources I could find and
without referring to any source code. I have done my best to ensure the options are valid for representative JVMs, however I have not tested every version of
every JVM so it is quite possible that options may not be valid in all cases.
A Collection of JVM Options
compiled by: Joseph D. Mocker (Sun Microsystems, Inc.)
revision: 28.Aug.2007
Option Type1.3.11.4.01.4.11.4.21.5.01.6.0 Description
-client
bool
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
Use Client HotSpot VM. Must be first option.
-server
bool
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
Use Server HotSpot VM. Must be first option.
-verbose[:class|gc|jni]
bool
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
enable output of various pieces of the VM.
specifying options twice may produce more
detailed output.
-cp
path
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
set search path for application classes and
resources
-classpath
path
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
set search path for application classes and
resources
-version
bool
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
print product version and exit
-showversion
bool
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
print product version and continue
-fullversion
bool
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
print full java version and exit
-agentlib:<libname>[=<options>]
nv
1.6.0
load native agent library <libname>, e.g. -
agentlib:hprof see also, -agentlib:jdwp=help
and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
nv
1.6.0
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
nv
1.6.0
load Java programming language agent, see
java.lang.instrument
-d32
bool
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
use a 32-bit data model if available
-d64
bool
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
use a 64-bit data model if available
-ea[:packagename...|:classname]
list
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
enable assertions
-enableassertions[:packagename...|:classname]
list
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
enable assertions
-da[:packagename...|:classname]
list
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
disable assertions
-disableassertions[:packagename...|:classname]
list
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
disable assertions
-esa
bool
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
enable system assertions
-enablesystemassertions
bool
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
enable system assertions
-dsa
bool
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
disable system assertions
-disablesystemassertions
bool
1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
disable system assertions
-Dname=value
nv
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
set a system property
-jre-restrict-search
bool
1.5.0 1.6.0
include user private JREs in the version search
-jre-no-restrict-search
bool
1.5.0 1.6.0
exclude user private JREs in the version
search
-Xt
bool
O O O O O O
turn on instruction tracing
-Xtm
bool
O O O O O O
turn on method tracing
-Xbootclasspath[/a|/p]:<path>
list
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
set, append to, or prepend to boot class path
-Xdebug
bool
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
enable remote debugging
-Xfuture
bool
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
enable strictest checks, anticipating future
default
-Xcheck:jni
bool
1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0
perform additional checks for JNI functions
-Xshare:off
bool
1.6.0
do not attempt to use shared class data
1.6.0
页码,