jdk/test/java/lang/Class/forName/modules/TestMain.java
changeset 44545 83b611b88ac8
parent 36511 9d0388c6b336
equal deleted inserted replaced
44480:2c33418a6d57 44545:83b611b88ac8
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    20  * or visit www.oracle.com if you need additional information or have any
    20  * or visit www.oracle.com if you need additional information or have any
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 import java.lang.reflect.Layer;
       
    25 import java.lang.reflect.Method;
    24 import java.lang.reflect.Method;
    26 import java.lang.reflect.Module;
       
    27 
    25 
    28 public class TestMain {
    26 public class TestMain {
    29     public static void main(String[] args) throws Exception {
    27     public static void main(String[] args) throws Exception {
    30         Layer boot = Layer.boot();
    28         ModuleLayer boot = ModuleLayer.boot();
    31         Module m1 = boot.findModule("m1").get();
    29         Module m1 = boot.findModule("m1").get();
    32         Module m2 = boot.findModule("m2").get();
    30         Module m2 = boot.findModule("m2").get();
    33 
    31 
    34         // find exported and non-exported class from a named module
    32         // find exported and non-exported class from a named module
    35         findClass(m1, "p1.A");
    33         findClass(m1, "p1.A");