应该是自定义的系统参数吧public class Test { public static void main(String[] args) throws Exception { System.out.println(System.getProperties().containsKey("test")); } }测试下就知道区别了: java -Dtest Test --print result "true" java Test --print result "false"
-xms is the start memory (at the VM start), -xmx is the maximum memory for the VMOptions 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.-DSmsCent 这个-D是option吧
怀疑是一个值为空的全局参数配置。。web服务器下面的所有项目都可以使用
如:项目中有一个参数CONFIG_XML的获取:
String config = System.getProperty("CONFIG_XML")
那可利用这种方式来配置:-DCONFIG_XML="xxxxx"
-Xms128m使用最小内存
-Xmx512m使用最多内存
public static void main(String[] args) throws Exception {
System.out.println(System.getProperties().containsKey("test"));
}
}测试下就知道区别了:
java -Dtest Test --print result "true"
java Test --print result "false"
这个-D是option吧