< prev index next >

src/java.base/share/classes/jdk/internal/loader/BootLoader.java

Print this page
rev 51958 : 8211122: Reduce the number of internal classes made accessible to jdk.unsupported
Reviewed-by: alanb, dfuchs, kvn


  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.internal.loader;
  26 
  27 import java.io.IOException;
  28 import java.io.InputStream;
  29 import java.lang.module.ModuleReference;
  30 import java.net.MalformedURLException;
  31 import java.net.URI;
  32 import java.net.URL;
  33 import java.nio.file.Files;
  34 import java.nio.file.Path;
  35 import java.security.AccessController;
  36 import java.security.PrivilegedAction;
  37 import java.util.Arrays;
  38 import java.util.Enumeration;
  39 import java.util.Optional;
  40 import java.util.concurrent.ConcurrentHashMap;
  41 import java.util.jar.JarInputStream;
  42 import java.util.jar.Manifest;
  43 import java.util.stream.Stream;
  44 
  45 import jdk.internal.misc.JavaLangAccess;
  46 import jdk.internal.misc.SharedSecrets;
  47 import jdk.internal.module.Modules;
  48 import jdk.internal.module.ServicesCatalog;
  49 import jdk.internal.util.StaticProperty;
  50 
  51 /**
  52  * Find resources and packages in modules defined to the boot class loader or
  53  * resources and packages on the "boot class path" specified via -Xbootclasspath/a.
  54  */
  55 
  56 public class BootLoader {
  57     private BootLoader() { }
  58 
  59     // The unnamed module for the boot loader
  60     private static final Module UNNAMED_MODULE;
  61     private static final String JAVA_HOME = StaticProperty.javaHome();
  62 
  63     static {
  64         UNNAMED_MODULE = SharedSecrets.getJavaLangAccess().defineUnnamedModule(null);
  65         setBootLoaderUnnamedModule0(UNNAMED_MODULE);
  66     }




  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.internal.loader;
  26 
  27 import java.io.IOException;
  28 import java.io.InputStream;
  29 import java.lang.module.ModuleReference;
  30 import java.net.MalformedURLException;
  31 import java.net.URI;
  32 import java.net.URL;
  33 import java.nio.file.Files;
  34 import java.nio.file.Path;
  35 import java.security.AccessController;
  36 import java.security.PrivilegedAction;
  37 import java.util.Arrays;
  38 import java.util.Enumeration;

  39 import java.util.concurrent.ConcurrentHashMap;
  40 import java.util.jar.JarInputStream;
  41 import java.util.jar.Manifest;
  42 import java.util.stream.Stream;
  43 
  44 import jdk.internal.access.JavaLangAccess;
  45 import jdk.internal.access.SharedSecrets;
  46 import jdk.internal.module.Modules;
  47 import jdk.internal.module.ServicesCatalog;
  48 import jdk.internal.util.StaticProperty;
  49 
  50 /**
  51  * Find resources and packages in modules defined to the boot class loader or
  52  * resources and packages on the "boot class path" specified via -Xbootclasspath/a.
  53  */
  54 
  55 public class BootLoader {
  56     private BootLoader() { }
  57 
  58     // The unnamed module for the boot loader
  59     private static final Module UNNAMED_MODULE;
  60     private static final String JAVA_HOME = StaticProperty.javaHome();
  61 
  62     static {
  63         UNNAMED_MODULE = SharedSecrets.getJavaLangAccess().defineUnnamedModule(null);
  64         setBootLoaderUnnamedModule0(UNNAMED_MODULE);
  65     }


< prev index next >