Reputation: 4951
There are lots of parameters for JVM. Some start with -
, such as -server
, -client
. Some start with -X
, such as -Xms
, -Xmx
. Some start with -XX
, such as -XX:PermSize
, -XX:UseParallelGC
.
Since these parameters are not duplicated, why start with so many different prefix? Why not just use -
. My guess is there are some kind of standards for this. The -XX
parameters are extension settings and not supported by all JVM impls. Is that so?
Upvotes: 22
Views: 8011
Reputation: 74571
These are three main categories of Command-Line Argument options:
Standard options :Options that begin with - are Standard options are expected to be accepted by all JVM implementations and are stable between releases (though they can be deprecated).
Non-standard options :Options that begin with -X are non-standard (not guaranteed to be supported on all JVM implementations), and are subject to change without notice in subsequent releases of the Java SDK.
Developer options :Options that begin with -XX are developer options and often 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.
Upvotes: 13
Reputation: 10667
Upvotes: 2
Reputation: 25177
Yeah, its the level of support. The vanilla ("-") options are supported in future versions, and the X are not supported. Further, the XX options are "not recommended for casual use".
For an example, see IBM's JVM documentation: http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=%2Fcom.ibm.java.doc.user.aix64.60%2Fdiag%2Fappendixes%2Fcmdline%2Fcommands_jvm.html
Upvotes: 7
Reputation: 63688
java -help
:
-X Displays information about non-standard options and exit
Upvotes: 1