XMS parameter is used to specify the initial heap size in Java whereas XMX parameter is used to specify the maximum heap size in Java.