14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
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 * @summary AppCDS handling of prohibited package.
28 * @requires vm.cds
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * java.management
32 * jdk.jartool/sun.tools.jar
33 * @compile test-classes/ProhibitedHelper.java test-classes/Prohibited.jasm
34 * @run main ProhibitedPackage
35 */
36
37 import jdk.test.lib.cds.CDSOptions;
38 import jdk.test.lib.Platform;
39 import jdk.test.lib.process.OutputAnalyzer;
40
41 public class ProhibitedPackage {
42
43 public static void main(String[] args) throws Exception {
44 JarBuilder.build("prohibited_pkg", "java/lang/Prohibited", "ProhibitedHelper");
45
46 String appJar = TestCommon.getTestJar("prohibited_pkg.jar");
47
48 // Test support for customer loaders
49 if (Platform.areCustomLoadersSupportedForCDS()) {
50 String classlist[] = new String[] {
51 "java/lang/Object id: 1",
52 "java/lang/Prohibited id: 2 super: 1 source: " + appJar
53 };
54
|
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
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 * @summary AppCDS handling of prohibited package.
28 * @requires vm.cds
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * java.management
32 * jdk.jartool/sun.tools.jar
33 * @compile test-classes/ProhibitedHelper.java test-classes/Prohibited.jasm
34 * @run driver ProhibitedPackage
35 */
36
37 import jdk.test.lib.cds.CDSOptions;
38 import jdk.test.lib.Platform;
39 import jdk.test.lib.process.OutputAnalyzer;
40
41 public class ProhibitedPackage {
42
43 public static void main(String[] args) throws Exception {
44 JarBuilder.build("prohibited_pkg", "java/lang/Prohibited", "ProhibitedHelper");
45
46 String appJar = TestCommon.getTestJar("prohibited_pkg.jar");
47
48 // Test support for customer loaders
49 if (Platform.areCustomLoadersSupportedForCDS()) {
50 String classlist[] = new String[] {
51 "java/lang/Object id: 1",
52 "java/lang/Prohibited id: 2 super: 1 source: " + appJar
53 };
54
|