Tomcat等应用启动脚本中的-D参数 [java的系统参数传递]
由于最近看Tomcat和GlassFish的源码,发现其启动脚本中有许多-D的参数,比如:
-Dcatalina.home="%CATALINA_HOME%"-Djava.io.tmpdir="%CATALINA_TMPDIR%"
System.getProperty(catalina.home"); //-D后相应的参数
where options include: -client to select the "client" VM -server to select the "server" VM -hotspot is a synonym for the "client" VM [deprecated] The default VM is client. -cp <class search path of directories and zip/jar files> -classpath <class search path of directories and zip/jar files> A ; separated list of directories, JAR archives, and ZIP archives to search for class files. -D<name>=<value> set a system property