mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8322322: Support archived full module graph when -Xbootclasspath/a is used
Reviewed-by: alanb, mchung
This commit is contained in:
parent
3fbccb01dc
commit
3b1e56a427
4 changed files with 53 additions and 14 deletions
|
@ -64,19 +64,19 @@ public class ClassLoaders {
|
|||
// Creates the built-in class loaders.
|
||||
static {
|
||||
ArchivedClassLoaders archivedClassLoaders = ArchivedClassLoaders.get();
|
||||
// -Xbootclasspath/a or -javaagent with Boot-Class-Path attribute
|
||||
String append = VM.getSavedProperty("jdk.boot.class.path.append");
|
||||
URLClassPath bootUcp = (append != null && !append.isEmpty())
|
||||
? new URLClassPath(append, true)
|
||||
: null;
|
||||
if (archivedClassLoaders != null) {
|
||||
// assert VM.getSavedProperty("jdk.boot.class.path.append") == null
|
||||
BOOT_LOADER = (BootClassLoader) archivedClassLoaders.bootLoader();
|
||||
BOOT_LOADER.setClassPath(bootUcp);
|
||||
setArchivedServicesCatalog(BOOT_LOADER);
|
||||
PLATFORM_LOADER = (PlatformClassLoader) archivedClassLoaders.platformLoader();
|
||||
setArchivedServicesCatalog(PLATFORM_LOADER);
|
||||
} else {
|
||||
// -Xbootclasspath/a or -javaagent with Boot-Class-Path attribute
|
||||
String append = VM.getSavedProperty("jdk.boot.class.path.append");
|
||||
URLClassPath ucp = (append != null && !append.isEmpty())
|
||||
? new URLClassPath(append, true)
|
||||
: null;
|
||||
BOOT_LOADER = new BootClassLoader(ucp);
|
||||
BOOT_LOADER = new BootClassLoader(bootUcp);
|
||||
PLATFORM_LOADER = new PlatformClassLoader(BOOT_LOADER);
|
||||
}
|
||||
// A class path is required when no initial module is specified.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue