Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. So to set the startup heap size to 128 MB, you would use -Xms128m.

However, -ms and -mx also seem to work. Is this true or does using -ms instead -Xms have some other effect?

Is this documented anywhere, either that -X is not necessary or that they are standard options?

Are there other options like these, which do not need to be prefixed with -X?

like image 246
Deepak Avatar asked Feb 28 '26 05:02

Deepak


1 Answers

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.

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

Developer Options: Options that are specified with -XX are not stable and are subject to change without notice.

like image 106
Fairoz Avatar answered Mar 01 '26 19:03

Fairoz