1.官网
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html
2.maven 打包剔除到配置文件插件
<build>
<finalName>user</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**/*.*</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
3.使用-Xbootclasspath/a
java -Dpinpoint.agentId=mydemo-user-classpath001 -Dpinpoint.applicationName=mydemo-user-classpath -javaagent:D:\pinpoint\pinpoint-agent-1.8.4\pinpoint-bootstrap-1.8.4.jar -Xbootclasspath/a:C:\Users\Bairong\Desktop\pinpointtest\user\config -jar .\user.jar
-Dproperty=value
设置系统属性值。该属性变量是没有空格表示属性的名称的字符串。的值变量是表示属性的值的字符串。如果value是带空格的字符串,则将其用引号括起来(例如-Dfoo=“foo bar”)。
Sets a system property value. The property variable is a string with no spaces that represents the name of the property. The value variable is a string that represents the value of the property. If value is a string with spaces, then enclose it in quotation marks (for example -Dfoo=“foo bar”).
-javaagent:jarpath[=options]
Loads the specified Java programming language agent. For more information about instrumenting Java applications, see the java.lang.instrument package description in the Java API documentation at http://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html
加载指定的Java编程语言代理程序。有关检测Java应用程序的更多信息,请参阅java.lang.instrumentJava API文档中的包描述http://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html
-Xbootclasspath:path
指定由分号(;)分隔的目录,JAR文件和ZIP存档的列表,以搜索引导类文件。这些用于代替JDK中包含的引导类文件。
不要部署使用此选项的应用程序覆盖类rt.jar,因为这违反了JRE二进制代码许可证。
Specifies a list of directories, JAR files, and ZIP archives separated by semicolons (? to search for boot class files. These are used in place of the boot class files included in the JDK.
Do not deploy applications that use this option to override a class in rt.jar, because this violates the JRE binary code license.
-Xbootclasspath/a:path
指定由分号(;)分隔的目录,JAR文件和ZIP存档的列表,以附加到默认引导程序类路径的末尾。
不要部署使用此选项的应用程序覆盖类rt.jar,因为这违反了JRE二进制代码许可证。
Specifies a list of directories, JAR files, and ZIP archives separated by semicolons (? to append to the end of the default bootstrap class path.
Do not deploy applications that use this option to override a class in rt.jar, because this violates the JRE binary code license.
-Xbootclasspath/p:path
指定由分号(;)分隔的目录,JAR文件和ZIP存档的列表,以预先添加到默认引导程序类路径的前面。
不要部署使用此选项的应用程序覆盖类rt.jar,因为这违反了JRE二进制代码许可证。
Specifies a list of directories, JAR files, and ZIP archives separated by semicolons (? to prepend to the front of the default bootstrap class path.
Do not deploy applications that use this option to override a class in rt.jar, because this violates the JRE binary code license.