17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
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
21 * questions.
22 *
23 */
24
25 /**
26 * @test
27 * @requires vm.cds & !vm.graal.enabled
28 * @library ../..
29 * @library /test/lib
30 * @modules java.compiler
31 * java.base/jdk.internal.misc
32 * jdk.jartool/sun.tools.jar
33 * @compile src/jdk/test/Main.java
34 * @compile src/com/sun/tools/javac/Main.jasm
35 * @compile src/com/sun/tools/javac/MyMain.jasm
36 * @compile ../../../SharedArchiveFile/javax/annotation/processing/FilerException.jasm
37 * @run main ClassPathTests
38 * @summary AppCDS tests for testing classpath/package conflicts
39 */
40
41 /*
42 * These tests will verify that AppCDS will correctly handle archived classes
43 * on the classpath that are in a package that is also exported by the jimage.
44 * These classes should fail to load unless --limit-modules is used to hide the
45 * package exported by the jimage. There are 8 variants of this test:
46 * - With a jimage app package and with a jimage ext package
47 * - With --limit-modules and without --limit-modules
48 * - With AppCDS and without AppCDS (to verify behaviour is the same for both).
49 *
50 * There is also a 9th test to verify that when --limit-modules is used, a jimage
51 * class in the archive can be replaced by a classpath class with the
52 * same name and package.
53 */
54
55 import java.lang.reflect.Method;
56 import java.nio.file.Path;
57 import java.nio.file.Paths;
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
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
21 * questions.
22 *
23 */
24
25 /**
26 * @test
27 * @requires vm.cds & !vm.graal.enabled
28 * @library ../..
29 * @library /test/lib
30 * @modules java.compiler
31 * java.base/jdk.internal.misc
32 * jdk.jartool/sun.tools.jar
33 * @compile src/jdk/test/Main.java
34 * @compile src/com/sun/tools/javac/Main.jasm
35 * @compile src/com/sun/tools/javac/MyMain.jasm
36 * @compile ../../../SharedArchiveFile/javax/annotation/processing/FilerException.jasm
37 * @run driver ClassPathTests
38 * @summary AppCDS tests for testing classpath/package conflicts
39 */
40
41 /*
42 * These tests will verify that AppCDS will correctly handle archived classes
43 * on the classpath that are in a package that is also exported by the jimage.
44 * These classes should fail to load unless --limit-modules is used to hide the
45 * package exported by the jimage. There are 8 variants of this test:
46 * - With a jimage app package and with a jimage ext package
47 * - With --limit-modules and without --limit-modules
48 * - With AppCDS and without AppCDS (to verify behaviour is the same for both).
49 *
50 * There is also a 9th test to verify that when --limit-modules is used, a jimage
51 * class in the archive can be replaced by a classpath class with the
52 * same name and package.
53 */
54
55 import java.lang.reflect.Method;
56 import java.nio.file.Path;
57 import java.nio.file.Paths;
|