Oracle documentation says that non-standard vm options like the startup heap size and the maximum heap size, are set by prefixing them with -X. So to set the startup heap size to 128 MB, you would use -Xms128m.
Oracle文档说,非标准的vm选项,如启动堆大小和最大堆大小,都是通过在它们前面添加-X来设置的。因此,要将启动堆大小设置为128 MB,请使用-Xms128m。
However, -ms and -mx also seem to work. Is this true or does using -ms instead -Xms have some other effect?
但是,-ms和-mx似乎也可以工作。这是真的还是使用-ms代替-Xms还有其他一些影响?
Is this documented anywhere, either that -X is not necessary or that they are standard options?
这是否记录在任何地方,或者-X是不必要的还是它们是标准选项?
Are there other options like these, which do not need to be prefixed with -X?
还有其他类似的选项,它们不需要以-X为前缀吗?
1 个解决方案
#1
2
There is slight difference as such below are the details
以下是细节,略有不同
Standard options : Options that begin with - are Standard options are expected to be accepted by all JVM implementations and are stable between releases Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Solaris & Linux.
标准选项:以 - 开头的选项 - 标准选项预计将被所有JVM实现接受并且在发行版之间保持稳定Java HotSpot VM识别的标准选项在Solaris和Linux的Java Application Launcher参考页面中描述。
Non-standard options : 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 JDK.Find more details
非标准选项:以-X开头的选项是非标准的(不保证在所有VM实现上都受支持),并且在JDK的后续版本中如有更改,恕不另行通知。查看更多详细信息
Developer Options: Options that are specified with -XX are not stable and are subject to change without notice.
开发人员选项:使用-XX指定的选项不稳定,如有更改,恕不另行通知。
#1
2
There is slight difference as such below are the details
以下是细节,略有不同
Standard options : Options that begin with - are Standard options are expected to be accepted by all JVM implementations and are stable between releases Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Solaris & Linux.
标准选项:以 - 开头的选项 - 标准选项预计将被所有JVM实现接受并且在发行版之间保持稳定Java HotSpot VM识别的标准选项在Solaris和Linux的Java Application Launcher参考页面中描述。
Non-standard options : 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 JDK.Find more details
非标准选项:以-X开头的选项是非标准的(不保证在所有VM实现上都受支持),并且在JDK的后续版本中如有更改,恕不另行通知。查看更多详细信息
Developer Options: Options that are specified with -XX are not stable and are subject to change without notice.
开发人员选项:使用-XX指定的选项不稳定,如有更改,恕不另行通知。