Java-d command-line arguments
we will use MVN to launch an application, such as the following command line:
- maven_opts= "-xx:permsize=256m-xx:maxpermsize=512m" mvn spring-boot:run-drun.jvmarguments= "-XDEBUG-XRUNJDWP: transport=dt_socket,server=y,suspend=n,address=8000 "
Let's take a look at the meaning of these command lines .
-dxxxx is the syntax for Java run parameters
The role is to configure some environment variables, what specific parameters , parameters have what effect, and you use the actual environment, the project structure are related
Yes, let the program know what Log_path stands for, and how the program is used, that's the procedure.
System.getproperty ("PropertyName") such as yours is System.getproperty ("Log_path") can get
The main function of Java has the string[] parameter. This parameter can be passed through-D.
Log_path this will be stored in the System.getproperty (),
Property is inherited from Hashtable. can be obtained by System.getproperty ("Log_path").
Java Startup Parameters
Java startup parameters are divided into three categories;
The first is the standard parameter (-), all JVM implementations must implement the functions of these parameters, and backward compatibility;
The second is the non-standard parameter (-x), the default JVM implements the functions of these parameters, but does not guarantee that all JVM implementations are satisfied, and does not guarantee backward compatibility;
its third is non- Stable parameters (-XX), such parameters of each JVM implementation will be different, in the future may be canceled at any time, need to use cautiously;
mvn command-line arguments
Mvn-v,–version display version information ;
mvn-v,–show-version continue execution after displaying version information Maven Other targets ;
Mvn-h,–help Display Help information ; Mvn-e,–errors Control Maven the log level , Generating execution error related messages ;
Mvn-x,–debug Control Maven the log level , Generating Execution Debug information ;
Mvn-q,–quiet Control Maven the log level , Just show Errors ;
mvn-pxxx Activate ID to be XXX of the Profile ( If there are multiple, separated by commas );
mvn-dxxx=yyy Specify Java Global Properties ;
Mvn-o, –offline Run Offline Mode , Non-networked update dependencies ;
mvn-n,–non-recursive execute commands only in the current project module , do not build sub-modules ;
Mvn-pl,–module_name executing commands on the specified module ;
Mvn-ff,–fail-fast exit directly when encountering a build failure ;
Mvn-fn,–fail-never no matter how the project results , build never fails ;
Mvn-fae,–fail-at-end affects build results only , allow non-affected builds to continue ;
mvn-c,–strict-checksums If the check code doesn't match, , Build Failed ;
mvn-c,–lax-checksums If the check code doesn't match, , Generate Alarms ;
mvn-u Force update snapshot Type of plug-in or dependent library ( otherwise maven One update only once a day snapshot dependent );
mvn-npu,–no-plugin-updates for any relevant registration plugin , no latest check ( Use this option to make the maven shows a stable behavior based on all plug-in versions currently available in the local warehouse );
mvn-cpu,–check-plugin-updates Registration plugin for any relevant , Force a recent check ( even if the Maven plugin version is explicitly specified in the project POM , it will be forced to update );
mvn-up,–update-plugins [MVN-CPU] Synonyms of ;
mvn-b,–batch-mode run in non-interactive (batch) mode ( when mven When you need to enter It won't stop accepting user input );
Mvn-f,–file force the use of alternate POM file ; Mvn-s,–settings alternate path to the User configuration file ;
mvn-gs,–global-settings Alternate path to global configuration file ;
Mvn-emp,–encrypt-master-password Encrypt the master security password , stored in Maven Settings in the file ;
Mvn-ep,–encrypt-password Encrypt server password , stored in Maven Settings in the file ;
Mvn-npr,–no-plugin-registry not used for plug-in versions ~/.m2/plugin-registry.xml ( plugin registration Form ) configuration in the
Java-d command-line arguments mvn-d parameters