How class loading is done by using -Xbootclasspath/p:path? [closed]
Asked Answered
Y

1

12

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

Yount answered 24/11, 2013 at 12:19 Comment(2)
Start by reading the Oracle documentation; i.e. the manual page on the java command and the document it links to on how the classpath works.Resemblance
@StephenC : I went through Oracle documentaion site but, it was quite unclear about the usage. Thats the reason of posting the question.Yount
G
19

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.

Gelhar answered 24/11, 2013 at 12:41 Comment(3)
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.htmlEmbus
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.