< prev index next >

test/runtime/modules/AccessCheck/UmodUPkg.java

Print this page




  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  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 
  26 /*
  27  * @test
  28  * @summary class p3.c3 defined in module m1 tries to access c4 defined in unnamed module.
  29  * @modules java.base/jdk.internal.misc
  30  * @library /testlibrary /test/lib
  31  * @compile myloaders/MySameClassLoader.java
  32  * @compile c4.java
  33  * @compile p3/c3.jcod
  34  * @compile p3/c3ReadEdge.jcod
  35  * @build UmodUPkg
  36  * @run main/othervm -Xbootclasspath/a:. UmodUPkg
  37  */
  38 
  39 import static jdk.test.lib.Asserts.*;
  40 
  41 import java.lang.module.Configuration;
  42 import java.lang.module.ModuleDescriptor;
  43 import java.lang.module.ModuleFinder;
  44 import java.lang.reflect.Layer;
  45 import java.lang.reflect.Module;
  46 import java.util.HashMap;
  47 import java.util.Map;
  48 import java.util.Set;
  49 import myloaders.MySameClassLoader;
  50 
  51 //
  52 // ClassLoader1 --> defines m1 --> packages p3
  53 //                  package p3 in m1 is exported unqualifiedly
  54 //
  55 // class p3.c3 defined in m1 tries to access c4 defined in




  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  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 
  26 /*
  27  * @test
  28  * @summary class p3.c3 defined in module m1 tries to access c4 defined in unnamed module.
  29  * @modules java.base/jdk.internal.misc
  30  * @library /test/lib
  31  * @compile myloaders/MySameClassLoader.java
  32  * @compile c4.java
  33  * @compile p3/c3.jcod
  34  * @compile p3/c3ReadEdge.jcod

  35  * @run main/othervm -Xbootclasspath/a:. UmodUPkg
  36  */
  37 
  38 import static jdk.test.lib.Asserts.*;
  39 
  40 import java.lang.module.Configuration;
  41 import java.lang.module.ModuleDescriptor;
  42 import java.lang.module.ModuleFinder;
  43 import java.lang.reflect.Layer;
  44 import java.lang.reflect.Module;
  45 import java.util.HashMap;
  46 import java.util.Map;
  47 import java.util.Set;
  48 import myloaders.MySameClassLoader;
  49 
  50 //
  51 // ClassLoader1 --> defines m1 --> packages p3
  52 //                  package p3 in m1 is exported unqualifiedly
  53 //
  54 // class p3.c3 defined in m1 tries to access c4 defined in


< prev index next >