Open for reading, a resource of the specified name from the search path
used to load classes. This method locates the resource through the
system class loader (see getSystemClassLoader()
).
Resources in named modules are subject to the encapsulation rules
specified by Module.getResourceAsStream
.
Additionally, and except for the special case where the resource has a
name ending with " .class
", this method will only find resources in
packages of named modules when the package is Module.isOpen(String)
unconditionally.
name
| The resource name |
null
if the
resource could not be found, the resource is in a package that
is not opened unconditionally, or access to the resource is
denied by the security manager.
@revised 9
@spec JPMS
Diagram: ClassLoader