< prev index next > src/java.base/share/classes/jdk/internal/loader/BootLoader.java
Print this page
// ClassLoaderValue map for the boot class loader
private static final ConcurrentHashMap<?, ?> CLASS_LOADER_VALUE_MAP
= new ConcurrentHashMap<>();
! // native libraries loaded by the boot class loader
! private static final NativeLibraries NATIVE_LIBS
! = NativeLibraries.newInstance(null);
/**
* Returns the unnamed module for the boot loader.
*/
public static Module getUnnamedModule() {
// ClassLoaderValue map for the boot class loader
private static final ConcurrentHashMap<?, ?> CLASS_LOADER_VALUE_MAP
= new ConcurrentHashMap<>();
! // Holder has the field(s) that need to be initialized during JVM bootstrap even if
! // the outer is aot-initialized.
! private static class Holder {
+ // native libraries loaded by the boot class loader
+ private static final NativeLibraries NATIVE_LIBS
+ = NativeLibraries.newInstance(null);
+ }
/**
* Returns the unnamed module for the boot loader.
*/
public static Module getUnnamedModule() {
/**
* Returns NativeLibraries for the boot class loader.
*/
public static NativeLibraries getNativeLibraries() {
! return NATIVE_LIBS;
}
/**
* Returns {@code true} if there is a class path associated with the
* BootLoader.
/**
* Returns NativeLibraries for the boot class loader.
*/
public static NativeLibraries getNativeLibraries() {
! return Holder.NATIVE_LIBS;
}
/**
* Returns {@code true} if there is a class path associated with the
* BootLoader.
< prev index next >