test/hotspot/jtreg/runtime/appcds/ProhibitedPackage.java
changeset 48155 551de50b4ff7
parent 48138 78b2ecdd3c4b
child 48156 a8f9aac3c2e5
equal deleted inserted replaced
48154:dea4d68f1340 48155:551de50b4ff7
    25 /*
    25 /*
    26  * @test
    26  * @test
    27  * @summary AppCDS handling of prohibited package.
    27  * @summary AppCDS handling of prohibited package.
    28  * AppCDS does not support uncompressed oops
    28  * AppCDS does not support uncompressed oops
    29  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
    29  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
       
    30  * @requires vm.cds
    30  * @library /test/lib
    31  * @library /test/lib
    31  * @modules java.base/jdk.internal.misc
    32  * @modules java.base/jdk.internal.misc
    32  *          java.management
    33  *          java.management
    33  *          jdk.jartool/sun.tools.jar
    34  *          jdk.jartool/sun.tools.jar
    34  * @compile test-classes/ProhibitedHelper.java test-classes/Prohibited.jasm
    35  * @compile test-classes/ProhibitedHelper.java test-classes/Prohibited.jasm
    43     public static void main(String[] args) throws Exception {
    44     public static void main(String[] args) throws Exception {
    44         JarBuilder.build("prohibited_pkg", "java/lang/Prohibited", "ProhibitedHelper");
    45         JarBuilder.build("prohibited_pkg", "java/lang/Prohibited", "ProhibitedHelper");
    45 
    46 
    46         String appJar = TestCommon.getTestJar("prohibited_pkg.jar");
    47         String appJar = TestCommon.getTestJar("prohibited_pkg.jar");
    47 
    48 
    48         // AppCDS for custom loader is only supported on linux-x64 and
    49         // Test support for customer loaders
    49         // Solaris 64-bit platforms.
    50         if (Platform.areCustomLoadersSupportedForCDS()) {
    50         if ((Platform.isLinux() || Platform.isSolaris()) &&
       
    51             Platform.is64bit()) {
       
    52             String classlist[] = new String[] {
    51             String classlist[] = new String[] {
    53                 "java/lang/Object id: 1",
    52                 "java/lang/Object id: 1",
    54                 "java/lang/Prohibited id: 2 super: 1 source: " + appJar
    53                 "java/lang/Prohibited id: 2 super: 1 source: " + appJar
    55             };
    54             };
    56 
    55