I've seen -Xbootclasspath/p:path being used for loading class dynamically can you please elaborate and explain by providing example.
How class loading is done by using -Xbootclasspath/p:path? [closed]
Asked Answered
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.
Doesn't -Xbootclasspath replace the standard boot classpath in its entirety? Why do you say that they are prepended? –
Polybasite
Looks like you can replace, append or prepend based on how you use it:
-Xbootclasspath:bootclasspath
files are used in place of; -Xbootclasspath/a:path
files are appended to; -Xbootclasspath/p:path
files are added in front of... docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html –
Embus Note the "comma separated lists" statement is wrong. Multiple jars on Xbootclasspath are separated the same way as for standard classpath - semicolon in Windows, colon in Linux. The
java -X
provides hint with correct separator on each platform. –
Bullpup © 2022 - 2024 — McMap. All rights reserved.
java
command and the document it links to on how the classpath works. – Resemblance