I've seen -Xbootclasspath/p:path being used for loading class dynamically can you please elaborate and explain by providing example.
Asked
Active
Viewed 3.7k times
11
-
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. – Stephen C Nov 24 '13 at 12:59
-
3@StephenC : I went through Oracle documentaion site but, it was quite unclear about the usage. Thats the reason of posting the question. – NEO Nov 24 '13 at 14:38
1 Answers
17
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.

user3020494
- 712
- 6
- 9
-
2Doesn't -Xbootclasspath *replace* the standard boot classpath in its entirety? Why do you say that they are *prepended*? – Pacerier Aug 27 '14 at 00:57
-
12Looks 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... http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html – pherris Feb 23 '15 at 17:19
-
4Note 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. – Tomáš Záluský May 11 '18 at 08:12