Java 如何使用 -Xbootclasspath/p:path 完成类加载?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20174355/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 23:43:54  来源:igfitidea点击:

How class loading is done by using -Xbootclasspath/p:path?

javadynamic-class-loaders

提问by NEO

I've seen -Xbootclasspath/p:path being used for loading class dynamically can you please elaborate and explain by providing example.

我已经看到 -Xbootclasspath/p:path 用于动态加载类,请您通过提供示例详细说明和解释。

采纳答案by user3020494

go to your command line and type java -X, to see the options available, -Xbootclasspath followed by path to comma seperated lists of jar files specified to prepend these classes before the standard jre classes. A use would be if you want to add patches affecting core runtime libraries.

转到您的命令行并键入 java -X,以查看可用选项,-Xbootclasspath 后跟以逗号分隔的 jar 文件列表的路径,指定为在标准 jre 类之前添加这些类。如果您想添加影响核心运行时库的补丁,则可以使用。