jdk/test/java/io/Serializable/packageAccess/Test.java
changeset 5809 6e38efd0293f
parent 5506 202f599c92aa
child 7668 d4a77089c587
equal deleted inserted replaced
5808:3a1f603c5ca7 5809:6e38efd0293f
    36     static Class bcl;
    36     static Class bcl;
    37     static Class dcl;
    37     static Class dcl;
    38 
    38 
    39     public static void main(String[] args) throws Exception {
    39     public static void main(String[] args) throws Exception {
    40         ClassLoader ldr =
    40         ClassLoader ldr =
    41             new URLClassLoader(new URL[]{ new URL("file:foo.jar") });
    41             new URLClassLoader(new URL[]{ new URL("file:foo.jar") },
       
    42                                Test.class.getClassLoader());
    42         bcl = Class.forName("B", true, ldr);
    43         bcl = Class.forName("B", true, ldr);
    43         dcl = Class.forName("D", true, ldr);
    44         dcl = Class.forName("D", true, ldr);
    44 
    45 
    45         Object b = bcl.newInstance();
    46         Object b = bcl.newInstance();
    46         try {
    47         try {