简体   繁体   English

设置不带-X的非标准Java vm选项-Xms

[英]Setting non-standard java vm options -Xms without -X

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. Oracle文档说,非标准vm选项(例如启动堆大小和最大堆大小)是通过在它们前面加上-X来设置的。 So to set the startup heap size to 128 MB, you would use -Xms128m. 因此,要将启动堆大小设置为128 MB,可以使用-Xms128m。

However, -ms and -mx also seem to work. 但是,-ms和-mx似乎也可以工作。 Is this true or does using -ms instead -Xms have some other effect? 这是真的,还是使用-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为前缀?

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实现所接受,并且在各个发行版之间均是稳定的。Solaris和Linux的Java应用程序启动器参考页中描述了Java HotSpot VM可以识别的标准选项。

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.Find后续版本更改,恕不另行通知详情

Developer Options : Options that are specified with -XX are not stable and are subject to change without notice. 开发人员选项 :-XX指定的选项不稳定,如有更改,恕不另行通知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM